JWT access strategy (preferred choice)
{
"owner": {
"SubaccountId": "<SubaccountId>",
"InstanceId": null
},
"destinationConfiguration": {
"Name": "poster-quovadis_opaque",
"Type": "HTTP",
"URL": "https://httpbin-anywhere.<API rule custom domain>",
"Authentication": "OAuth2ClientCredentials",
"ProxyType": "Internet",
"tokenServiceURLType": "Dedicated",
"tokenService.body.token_format": "opaque",
"HTML5.DynamicDestination": "true",
"clientId": "<clientId>",
"Description": "poster-quovadis-opaque",
"scope": "openid",
"clientSecret": "<clientSecret>",
"tokenServiceURL": "https://<sap ias tenant>.accounts400.ondemand.com/oauth2/token"
},
"authTokens": [
{
"type": "Bearer",
"value": "NTM2ZGYxMzYtMDU3Yy00ZWNhLTliZDctMTIzYjA2MTg5NGE2bmdtUncyOFI1RUdLa0UxdUhqVGNoaWZ5TC1LR2xwZXdEaXVzczF0NlFxOA",
"http_header": {
"key": "Authorization",
"value": "Bearer NTM2ZGYxMzYtMDU3Yy00ZWNhLTliZDctMTIzYjA2MTg5NGE2bmdtUncyOFI1RUdLa0UxdUhqVGNoaWZ5TC1LR2xwZXdEaXVzczF0NlFxOA"
},
"expires_in": "3600"
}
]
}
The authentication handler encountered an error audience=application authentication_handler=oauth2_introspection error=map[message:json: cannot unmarshal array into Go struct field AuthenticatorOAuth2IntrospectionResult.scope of type string
introspection_request_headers
object as shown below:apiVersion: gateway.kyma-project.io/v1beta1
kind: APIRule
metadata:
labels:
app.kubernetes.io/name: httpbin-introspect
name: httpbin-introspect
namespace: quovadis
spec:
gateway: quovadis-azure-dns-gateway.azure-dns.svc.cluster.local
host: httpbin-introspect.btp.quovadis-anywhere.com
rules:
- accessStrategies:
- config:
introspection_request_headers:
Authorization: >-
Basic
MTEwODVkYTgtNT****************FbVRzaw==
introspection_url: https://<sap ias tenant>.accounts400.ondemand.com/oauth2/introspect
required_scope:
- openid
- read
- write
token_from:
header: Authorization
handler: oauth2_introspection
methods:
- GET
- POST
- PUT
- DELETE
- PATCH
- HEAD
path: /.*
timeout: 300
service:
name: httpbin
port: 8000
timeout: 300
introspection_request_headers
object. {
"Name": "introspect-me",
"Type": "HTTP",
"URL": "https://sap.com",
"Authentication": "BasicAuthentication",
"ProxyType": "Internet",
"User": "<client_id>",
"Description": "provide base64-encoded introspection endpoint credentials",
"Password": "<client_secret>"
},
"authTokens": [
{
"type": "Basic",
"value": "MTEwODVkYTgtNT****************FbVRzaw==",
"http_header": {
"key": "Authorization",
"value": "Basic MTEwODVkYTgtNT****************FbVRzaw=="
}
}
]
}
the pre_authorization
object in lieu of the introspection_request_headers
object, as follows:apiVersion: gateway.kyma-project.io/v1beta1
kind: APIRule
metadata:
labels:
app.kubernetes.io/name: httpbin-introspect
name: httpbin-introspect
namespace: <namespace>
spec:
gateway: quovadis-azure-dns-gateway.azure-dns.svc.cluster.local
host: httpbin-introspect.<custom domain>
rules:
- accessStrategies:
- config:
introspection_request_headers: {}
introspection_url: https://<sap ias tenant>.accounts400.ondemand.com/oauth2/introspect
pre_authorization:
client_id: <client_id>
client_secret: <client_secret>
enabled: true
token_url: https://<sap ias tenant>.accounts400.ondemand.com/oauth2/token
required_scope:
- openid
- read
- write
target_audience:
- toto01
- toto02
handler: oauth2_introspection
methods:
- GET
- POST
- PUT
- DELETE
- PATCH
- HEAD
path: /.*
service:
name: httpbin
port: 8000
timeout: 300
service:
name: httpbin
port: 8000
timeout: 300
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
20 | |
10 | |
9 | |
7 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 |