THREESCALE-10518 - Operator crash - OpenAPI CR doesn't create correct backend… #915
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WHAT
Jira: https://issues.redhat.com/browse/THREESCALE-10518
Operator crash - OpenAPI CR doesn't create correct backend usage section in Product CR
This PR will replace #908 that was demaged in squash/rebase process.
Review notes will see in PR 908
Validation - Preparation
Install RHSSO
Create project rhsso-test
In RH User SSO web console:
petstore
In RH User SSO web console:
Client ID
: 3scale-zyncClient Settings:
3scale-zync Client setting will be as in the table below
Service Account Roles
tab -> Client Rolesrealm-management
->manage-clients
Install 3scale
please place your wildcardDomain
This is the secret that contains URL for issuerEndpoint.
The secret is referenced in OpenApi CR - field issuerEndpointRef.
Openapi Secret
Apply Secret that contains OpenApi spec
NOTE Two OAS securitySchemes will be tested -
oauth2
andopenidConnect
. See more details in Validation section.Validation - Tests
Test cases
Following cases will be tested
OpenApiCR is OIDC. OAS securitySheme type: oauth2
Test1. Invalid OpenApi CR. OIDC Issuer Endpoint definition is missing in CR.
Test2. Valid OpenApi CR (oidc), Valid OAS (oauth2)
3scale-operator/doc/openapi-user-guide.md
Lines 191 to 196 in 185e1ae
Test3. Invalid OAS - missing flows definition in OAS securitySheme
OpenApiCR is OIDC. OAS securitySheme type: openIdConnect
OIDC not defined in OpenApiCR spec. OAS securitySheme type: one of oauth2 or openIdConnect
OpenApiCR is OIDC. OAS securitySheme not defined
Tests Examples
Test1. Invalid OpenApi CR. OIDC Issuer Endpoint definition is missing in CR
Test2 - Valid OpenApi CR (oidc), Valid OAS (oauth2)
issuerEndpointRef
as in example belowNotes for other tests execution
openapi-example-2
. Also add suffix to OAS titile, liketitle: Swagger Petstore 2