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

Add a verification check on Org Code, whether it is the correct one for the project #217

Open
shazron opened this issue Jun 24, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@shazron
Copy link
Member

shazron commented Jun 24, 2024

A dev might have logged into another Org, and used the logged-in access token (from the web browser) to do operations on their current Project. This is a mismatch, and results in an error when accessing certain operations.

Error

$ aio console project list
 »   Error: [CoreConsoleAPISDK:ERROR_GET_PROJECTS_BY_ORG_ID] 403 - Forbidden
 »   ({"id":"f43a63e9-a891-4b53-9416-2a83c55aa08b","messages":[{"template":"ERR_MSG_OPERAT
 »   ION_NOT_ALLOWED","message":"User [REDACTED_USER]
 »    not allowed to access resources of org [REDACTED_ORG_ID]"}]})

Investigation

The Org Code from running aio console org ls does not match the Org Code when running aio config get project.org.ims_org_id.
This value is in the .aio file of the project.

An access token is tied to a specific Org.

Resolution

  1. Go to https://developer.adobe.com/console, logout from the browser
  2. Run aio logout --force
  3. Run aio login

Then run your command again.

Diagnostic Fix

The fix is above, but for diagnostic purposes, there should be a command, or a flag to a command, that can show there is an Org Code mismatch, thus the dev needs to login again via the Resolution step above. Perhaps it is a good candidate for aio info

@shazron shazron added the enhancement New feature or request label Jun 24, 2024
@shazron shazron changed the title Add a verification check on access token, whether it is the correct one for the project Add a verification check on Org Code, whether it is the correct one for the project Jun 24, 2024
@aiojbot
Copy link
Collaborator

aiojbot commented Jun 24, 2024

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-3058

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants