ROX-12450: Support robot accounts in Quay integration form#2974
Merged
pedrottimark merged 3 commits intomasterfrom Sep 6, 2022
Merged
ROX-12450: Support robot accounts in Quay integration form#2974pedrottimark merged 3 commits intomasterfrom
pedrottimark merged 3 commits intomasterfrom
Conversation
|
Images are ready for the commit at 8523d20. To use with deploy scripts, first |
vjwilson
approved these changes
Sep 6, 2022
|
@pedrottimark: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Counterpart to #2578
Adjustments to mocks for factors that were absent in the original overview: Update stored credentials check box and no authentication for public registries.
Alertelement (if editing which includes creating) preceding Update stored credentials field. It has Authentication as title. Conditionally render bullet items which are relevant for the type. Write the items in parallel form.Changed files
Edit cypress/integration/integrations/imageIntegrations.test.js
'An OAuth token is required'assertion.Edit src/Containers/Integrations/IntegrationForm/Forms/QuayIntegrationForm.tsx
oauthTokenfromvalidationSchemaobject so backend is the single source of truth.registryRobotCredentials: nullproperty todefaultValuesobject.hasInitialOauthTokenand include it in the condition whether to render'Currently-stored token will be used.'for placeholder of OAuth token.passwordlikeoauthTokenproperty.Alertelement if editing which includes creating.isRequiredprop becauseAlertelement explains the relationships.usernamein the condition whether to render'Currently-stored password will be used.'for placeholder of Robot password.Edit src/types/imageIntegration.proto.ts
registryRobotCredentialsproperty toQuayConfigtype.QuayRobotAccounttype.Checklist
Testing Performed
With feature flag disabled
export ROX_QUAY_ROBOT_ACCOUNTS=falseView existing integration
OAuth token field with empty input box that is disabled. Response:

registryRobotCredentials: nullUpdate stored credentials is ticked: OAuth token field with empty input box that is enabled.

With feature flag enabled
export ROX_QUAY_ROBOT_ACCOUNTS=trueAuthentication
If editing, which includes creating, Authentication info alert renders relevant items:
Registry

Scanner

Registry + Scanner

Behavior
View existing integration
Registry: OAuth token Robot username Robot password fields with empty input boxes that are disabled, but username is not empty if there is a Robot account.

Scanner: OAuth token field with empty input box that is disabled.

Registry + Scanner: OAuth token Robot username Robot password fields with empty input boxes that are disabled, but username is not empty if there is a Robot account.

Create new integration: Relevant fields have empty input boxes that are enabled. For Type of Scanner, only OAuth token field is relevant.
Public repository: Leave empty. See properties in payload and response:
Private repository: Enter stored credentials in relevant fields. See properties in payload and response:
Edit existing integration
If initial values do not have stored credentials: Update stored credentials is unticked and relevant fields have empty input boxes that are disabled. For Type of Scanner, only OAuth token field is relevant.

If initial values do have stored credentials: Update stored credentials is ticked and relevant fields have empty input boxes that are enabled, but username is not empty if there is a Robot account. For Type of Scanner, only OAuth token field is relevant.

Edge case: Update stored credentials is ticked and delete Username with intent to change from authenticated to unauthenticated:
Maybe would need
registryRobotCredentials: nullinstead, because interpreted as incomplete request to update stored credentials. At least it demonstrates that form displays error message.