adobe / adobe/aio-cli-plugin-cloudmanager

AccessToken is always stored in global config below the IMS context

Open
#697 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
50
Forks
36
PR merge metrics
No merged PRs in 30d

Description

When using a local `.aio` config file similar to what is outlined in https://github.com/adobe/aio-cli-plugin-cloudmanager?tab=readme-ov-file#setup-for-oauth-integration with `aio config:set ims.contexts.aio-cli-plugin-cloudmanager PATH_TO_CONFIG_JSON_FILE --file --json --local` I expect that the accessToken which is retrieved is also stored locally, however this is persisted in the global aio config due to https://github.com/adobe/aio-lib-ims/issues/67 like this.

```
ims: {
contexts: {
aio-cli-plugin-cloudmanager: {
...
// duplicated service credentials from the local .aoi file
...
access_token: {
token: ",
expiry: ...
}
},
```

In order to be able to easily switch between different credentials/organization just using the local AIO config (https://github.com/adobe/aio-lib-core-config/tree/master?tab=readme-ov-file#project-configuration) is not enough. Instead one currently has to use dedicated/unique IMS context names and always pass that via `imsContextName` to each `aio cloudmanager` command as workaround.

Please document that limitation in the readme and try to fix the upstream bug in https://github.com/adobe/aio-lib-ims/issues/67.

Contributor guide

Open the contributing guide

Research direction

Start with the README setup section linked in the issue and reproduce the local `.aio` configuration with the Cloud Manager IMS context. Review upstream `aio-lib-ims` issue #67 to understand the global token persistence, then document the limitation and determine the upstream fix needed; done means local credentials no longer persist globally or the limitation is clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.