feat: Add config-manager push secret-mappings command#85
Draft
dallinjsevy wants to merge 1 commit intomainfrom
Draft
feat: Add config-manager push secret-mappings command#85dallinjsevy wants to merge 1 commit intomainfrom
dallinjsevy wants to merge 1 commit intomainfrom
Conversation
9344127 to
50a3a18
Compare
50a3a18 to
a6720e2
Compare
phalestrivir
requested changes
Mar 31, 2026
src/cli/config-manager/config-manager-push/config-manager-push-secret-mappings.ts
Show resolved
Hide resolved
src/cli/config-manager/config-manager-push/config-manager-push-secret-mappings.ts
Show resolved
Hide resolved
src/cli/config-manager/config-manager-push/config-manager-push-secret-mappings.ts
Show resolved
Hide resolved
| if (options.realm) { | ||
| realm = options.realm; | ||
| } | ||
| if (await getTokens(false, true, deploymentTypes)) { |
There was a problem hiding this comment.
We are going to want to check that when the -n, --name flag is provided that the -r, --realm flag is provided as well, since fr-config-manager requires both to be present when using -n, --name.
| */ | ||
|
|
||
| /* | ||
| // ForgeOps |
Comment on lines
+51
to
+53
| FRODO_MOCK=record FRODO_NO_CACHE=1 FRODO_HOST=https://nightly.gcp.forgeops.com/am frodo config-manager push secret-mappings -D test/e2e/exports/fr-config-manager/forgeops -m cloud | ||
| FRODO_MOCK=record FRODO_NO_CACHE=1 FRODO_HOST=https://nightly.gcp.forgeops.com/am frodo config-manager push secret-mappings -r alpha -D test/e2e/exports/fr-config-manager/forgeops -m cloud | ||
| FRODO_MOCK=record FRODO_NO_CACHE=1 FRODO_HOST=https://nightly.gcp.forgeops.com/am frodo config-manager push secret-mappings -n am.services.oauth2.stateless.signing.HMAC -D test/e2e/exports/fr-config-manager/forgeops -m cloud |
There was a problem hiding this comment.
FRODO_HOST is wrong, it should be the host of the frodo dev tenant (look at the other frodo tests to see what that looks like).
You also don't need to have the -m flag, that's optional here if you want to remove it.
Comment on lines
+69
to
+86
| describe('frodo config-manager push secret-mappings', () => { | ||
| test(`"frodo config-manager push secret-mappings -D ${allDirectory} -m cloud": should import the password policy into cloud"`, async () => { | ||
| const CMD = `frodo config-manager push secret-mappings -D ${allDirectory} -m cloud`; | ||
| const { stdout } = await exec(CMD, cloudEnv); | ||
| expect(removeAnsiEscapeCodes(stdout)).toMatchSnapshot(); | ||
| }); | ||
|
|
||
| test(`"frodo config-manager push secret-mappings -r alpha ${allDirectory} -m cloud": should import a specific password policy by name into cloud"`, async () => { | ||
| const CMD = `frodo config-manager push secret-mappings -r alpha -D ${allDirectory} -m cloud`; | ||
| const { stdout } = await exec(CMD, cloudEnv); | ||
| expect(removeAnsiEscapeCodes(stdout)).toMatchSnapshot(); | ||
| }); | ||
| test(`"frodo config-manager push secret-mappings -n am.services.oauth2.stateless.signing.HMAC ${allDirectory} -m cloud": should import a specific password policy by name into cloud"`, async () => { | ||
| const CMD = `frodo config-manager push secret-mappings -n am.services.oauth2.stateless.signing.HMAC -D ${allDirectory} -m cloud`; | ||
| const { stdout } = await exec(CMD, cloudEnv); | ||
| expect(removeAnsiEscapeCodes(stdout)).toMatchSnapshot(); | ||
| }); | ||
| }); No newline at end of file |
There was a problem hiding this comment.
The descriptions on these tests say password policy, so they need to be updated
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.
No description provided.