-
Notifications
You must be signed in to change notification settings - Fork 101
THREESCALE-9884 - Add support for OAuth2/OIDC in the OpenAPI CRD #837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
c9ba986 to
b2d701b
Compare
dba8789 to
626c9dd
Compare
626c9dd to
e0ca861
Compare
eguzki
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO the OpenAPI CRD design needs further refinement
3734289 to
a557e56
Compare
eguzki
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more changes requested from the documentation
…roxy.go::syncProxyOIDC method
53530f8 to
88ec1bb
Compare
Updated. Thank you for comments. |
|
Hi @eguzki , could you please review/approve. Thank you! |
88ec1bb to
d30f150
Compare
|
@eguzki , thank you very much for comments! Updated. cc @austincunningham |
d30f150 to
71ff540
Compare
|
Code Climate has analyzed commit 71ff540 and detected 0 issues on this pull request. View more on Code Climate. |
WHAT
Jira: https://issues.redhat.com/browse/THREESCALE-9884
Add support for OAuth2/OIDC in the OpenAPI CRD
Design issue: #842
Changes in CRDs:
openapi_types.go
config/crd/bases/capabilities.3scale.net_openapis.yaml
In Validation section we describe how to integrate 3scale operator with RHSSO and check current development.
Validation
Prepare cluster (could be OSD)
Install RHSSO
In RH User SSO web console:
petstoreIn RH User SSO web console:
Client ID: 3scale-zyncClient Settings:
3scale-zync Client setting will be as in the table below
Service Account Rolestab -> Client Rolesrealm-management->manage-clientsInstall 3scale
please place your wildcardDomain
This is the secret that contains URL for issuerEndpoint.
The secret is referenced in OpenApi CR - field issuerEndpointRef.
Openapi CR example ():
Notes
OIDC schema definitions were added.
Validate 3scale Portal
Look at 3scale Portal, to see how it was configured from OpenapiCR.
Swagger PetstorecreatedSwagger PetstorecrearedOptional validation steps: 8-13:
petstorePlan, petstoreApp
9.1. Note Client and Client Secret
for example: Client ID abcd1234
Product/Integration/Configuration
Example:
curl -v -H "Accept: application/json" -H "Authorization: Bearer $TKN" https://swagger-petstore-3scale-apicast-staging.apps.vmogilev01.giq5.s1.devshift.org
Priority of issuerEndpoint usage (issuerEndpoint vs issuerEndpointRef/Secret)
issuerEndpointcan be used for validation or other purposes.issuerEndpoint: https://3scale-zync:test123@keycloak-rhsso-test.apps.vmogilev01.mjhc.s1.devshift.org/auth/realms/petstore, as in example below:OAUTH2 security scheme Validation
oauth2security scheme validation:Notes
petstore_oauth2.yaml(see link in CR )For current example -
implicitflow is defined in swagger file.oauth2 flowsand authentication flows in 3scale portal:| oauth2 flow name /in swagger| 3scale / OIDC flow name |
|-----------------------|--------------------|
| Implicit | Implicit |
| AuthorizationCode | StandardFlowEnabled |
| Password | DirectAccessGrantsEnabled |
| ClientCredentials | ServiceAccountsEnabled |
see OpenAPI Specification for oauth2 flows reference.
Expected:
OpenID Connect Issuer- issuerEndpoint set as defined inoidc-issuer-client-secretsecretImplicit Flow- selected, as defined in swagger filepetstore_oauth2.yamlReferences
References/ help for testing