简体   繁体   中英

How to setup destination in Neo SCP to Cloud Foundry service using OAuth2SAMLBearerAssertion?

I want to consume a CF service in my Neo SCP, using a destination with OAuthSAMLBearerAssertion.

But every time I check for the service in WebIDE, I get error 500.

Here is my destination:

#clientKey= Client-ID of your OAuth client
--> you will get the clientid from environment variables in CF: 
--> xsuaa --> credentials --> clientid
#tokenServicePassword=  Client secret of your OAuth client
--> you will get the clientsecret from environment variables in CF: 
--> xsuaa --> credentials --> clientsecret
#Tue May 21 07:02:37 UTC 2019
Description=CF HANA OData Service
Type=HTTP
TrustAll=true
audience=xyz.aws-live-eu10 (=EntityID out of the SAML metadata)
Authentication=OAuth2SAMLBearerAssertion
WebIDEUsage=odata_gen
Name=cf_xyz_odata_auth
WebIDEEnabled=true
tokenServiceURL=https\://xyz.authentication.eu10.hana.ondemand.com/oauth/token/alias/xyz.aws-live-eu10 (= Token URL out of the SAML metadata)
URL=https\://backend.cfapps.eu10.hana.ondemand.com
ProxyType=Internet
tokenServiceURLType=Dedicated
tokenServiceUser= same as client key
WebIDESystem=CF

Any ideas?

Fixed it:

Problem was that I did had to give the Neo-Account as "allowed provider" in the oauth2-configuration in the xs-security.json and delete/re-start the xsuaa service instance.

"oauth2-configuration": {

    "token-validity": 900,

    "refresh-token-validity": 1800,

    "autoapprove": "true",

    "allowedproviders": ["..."],

    "grant-types": ["refresh_token", "urn:ietf:params:oauth:grant-type:saml2-bearer", "password", "authorization_code"]


}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM