Skip to content
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

Log api keys are not generated anymore in new version #195

Closed
DannyBlazejczak opened this issue Feb 8, 2023 · 3 comments · Fixed by rockcarver/frodo-lib#219 or #201
Closed

Log api keys are not generated anymore in new version #195

DannyBlazejczak opened this issue Feb 8, 2023 · 3 comments · Fixed by rockcarver/frodo-lib#219 or #201
Assignees
Labels
bug Something isn't working

Comments

@DannyBlazejczak
Copy link

In version 0.15.1 - the previous version that I used, the logs API keys are automatically created.

In the latest version in 0.21.1, the auto creation of the API keys fail with following error message:
npx --no-install frodo logs tail staging alpha Connected to https://openam-xxxx-staging.id.forgerock.io/am [alpha] as user xxxxxx get keys ERROR: get keys call returned AxiosError: Request failed with status code 403 TypeError: Cannot read properties of undefined (reading 'api_key_id') at FrodoCommand.<anonymous> (/Users/xxxxx/projects/workspaces/GitHub/xxxxa/infra/node_modules/@rockcarver/frodo-cli/esm/cli/logging/cli/logging/logs-tail.ts:66:36) at processTicksAndRejections (node:internal/process/task_queues:96:5)

The migration of the old ~/.frodo/.frodorc to ~/.frodo/Connections.json automatically migrates those API keys into the new format. So upgrading to the new version still works for the log api keys. But creating new keys in a new environment is broken.

@DannyBlazejczak DannyBlazejczak added the bug Something isn't working label Feb 8, 2023
@vscheuber
Copy link
Contributor

@DannyBlazejczak thank you for reporting this issue. It appears that the new service accounts don't have the necessary privileges to create log API keys. I'm looking into this now.

My current thinking is to move the log API key generation into the frodo conn save command, where we have access to an admin session, which we use to create the service account.

@vscheuber vscheuber self-assigned this Feb 8, 2023
@DannyBlazejczak
Copy link
Author

That makes sense yes. That's what I also tried to see if log keys could get generated in that way.

@vscheuber
Copy link
Contributor

Backend changes are in, cli changes still pending.

@vscheuber vscheuber reopened this Feb 13, 2023
vscheuber added a commit to vscheuber/frodo-cli that referenced this issue Feb 13, 2023
vscheuber added a commit to vscheuber/frodo-lib that referenced this issue Aug 28, 2023
vscheuber added a commit to vscheuber/frodo-lib that referenced this issue Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants