Giter Club home page Giter Club logo

Comments (14)

mabroor avatar mabroor commented on July 2, 2024 1

The docs have a lot of inconsistencies between all the different repos. Does anyone have a working example of this?

from aio-cli-plugin-cloudmanager.

chrfis avatar chrfis commented on July 2, 2024

This feature request has already been raised by @kwin
#671

from aio-cli-plugin-cloudmanager.

sanith01988 avatar sanith01988 commented on July 2, 2024

v6.4.0 already released https://www.npmjs.com/package/@adobe/aio-lib-ims/v/6.4.0

from aio-cli-plugin-cloudmanager.

lszajek avatar lszajek commented on July 2, 2024

I found temporary solution which works for me:

  1. Install latest aio-cli-plugin-auth (3.2.1)
  2. Add to global ~/.config/aio file (take credentials from developer console):
{
  aio-cli-telemetry: {
    optOut: true,
    clientId: COPY_YOUR_CLIENT_ID_HERE
  },
  cloudmanager_programid: "COPY_YOUR_PROGRAMID_HERE",
  ims: {
    contexts: {
      aio-cli-plugin-cloudmanager: {
        ims_org_id: "COPY_YOUR_IMS_ORG_ID_HERE",
        client_id: "COPY_YOUR_CLIENT_ID_HERE",
        client_secrets: [
          "COPY_YOUR_SECRET_HERE"
        ],
        technical_account_id: "COPY_YOUR_ACCOUNT_ID_HERE",
        technical_account_email: "COPY_YOUR_ACCOUNT_EMAIL_HERE",
        scopes: [
          "COPY_YOUR_SCOPES_HERE"
        ],
      }
    },
    config: {
      current: "aio-cli-plugin-cloudmanager"
    }
  }
}
  1. Run aio auth login (access_token will be added to ~/.config/aio file)
  2. Verify cloud manager plugin's command: aio cloudmanager:list-programs

from aio-cli-plugin-cloudmanager.

sanith01988 avatar sanith01988 commented on July 2, 2024

@lszajek,
I tried this. But when I'm trying to call aio auth login its again redirecting to browser for authentication.

from aio-cli-plugin-cloudmanager.

lszajek avatar lszajek commented on July 2, 2024

Did you check the version of aio-cli-plugin-cloudmanager plugin? It seems that v4.1.0 has fixed that. And make sure that you have OAuth Server-to-Server credentials set at developer console.

from aio-cli-plugin-cloudmanager.

lszajek avatar lszajek commented on July 2, 2024

Also check the version of aio-cli, it is working for me with v9.3.0

from aio-cli-plugin-cloudmanager.

thedevopsguyblog avatar thedevopsguyblog commented on July 2, 2024

This worked for me (i used a config.json file instead of a .yaml file), thanks @lszajek.
Can this be documented here: https://developer.adobe.com/developer-console/docs/guides/authentication/

I created my config file by searching my projects credentials in cloud manager - is there an eaiser way to get this information?

from aio-cli-plugin-cloudmanager.

thedevopsguyblog avatar thedevopsguyblog commented on July 2, 2024

This worked for me (i used a config.json file instead of a .yaml file), thanks @lszajek. Can this be documented here: https://developer.adobe.com/developer-console/docs/guides/authentication/

I created my config file by searching my projects credentials in cloud manager - is there an eaiser way to get this information?

looks like executing this aio auth login is not needed, as i'm able to execute aio cloudmanager:pipeline:create-execution xxxx --emergency succesfully without running "auth login"

from aio-cli-plugin-cloudmanager.

edukondaluavula avatar edukondaluavula commented on July 2, 2024

I am having same issue in aio-cli v9.3.0

command: aio auth login -v -c=pipeline

json file:

{
"ims": {
"config": {
"current": "pipeline"
},
"contexts": {
"pipeline": {
"client_id": "XXXXXXXXXXX",
"client_secrets": ["XXXXXXXXXXXXXX"],
"ims_org_id": "XXXXXXXXXX@AdobeOrg",
"technical_account_id": "[email protected]",
"technical_account_email": "[email protected]",
"scopes": ["AdobeID openid read_organizations additional_info.projectedProductContext additional_info.roles adobeio_api read_client_secret manage_client_secrets"],
"state": ""
}
}
}
}

Please suggest me to address this issue ?

from aio-cli-plugin-cloudmanager.

mstuart2-dxc avatar mstuart2-dxc commented on July 2, 2024

I too, have an issue using OAuth2 with the cloudmanager plugin.

These are my versions:

$ aio plugins
@adobe/aio-cli-plugin-aem-rde 1.1.0
@adobe/aio-cli-plugin-cloudmanager 4.1.0
$ aio --version
@adobe/aio-cli/9.4.1 wsl-x64 node-v16.20.2

And I have this set up ~/.config/aio (thank you @lszajek. )

 ims: {
    contexts: {
      aio-cli-plugin-cloudmanager: {
        ims_org_id: "XXX",
        grant_type: "client_credentials",
        client_id: "XXX",
        client_secrets: [
          "XXX"
        ],
        technical_account_id: "XXX",
        technical_account_email: "XXX",
        scopes: [
          "openid",
          "AdobeID",
          "read_organizations",
          "additional_info.projectedProductContext",
          "read_pc.dma_aem_ams"
        ],
      }
    },
    config: {
      current: "aio-cli-plugin-cloudmanager"
    }
  }

Login works perfectly. When I do aio auth:login I get a key returned and added to my configuration. However, cloudmanager still seems to be looking for parameters related to JWT.

$ aio cloudmanager:list-programs
 ›   Error: [CloudManagerCLI:IMS_CONTEXT_MISSING_FIELDS] One or more of the required fields in
 ›   ims.contexts.aio-cli-plugin-cloudmanager were not set. Missing keys were client_secret, meta_scopes,
 ›   private_key.
 ›   Code: IMS_CONTEXT_MISSING_FIELDS

from aio-cli-plugin-cloudmanager.

lszajek avatar lszajek commented on July 2, 2024

@mstuart2-dxc I also had such a problem after upgrading aio-cli-plugin-cloudmanager to 4.1.0 and temporary resolved it by disabling prerun hook in package.json. Just rename "prerun": "./src/hooks/prerun/prerun-all.js" to "__prerun": "./src/hooks/prerun/prerun-all.js" in aio-cli-plugin-cloudmanager package.json file. I have this file here: ~/.local/share/@adobe/aio-cli/node_modules/@adobe/aio-cli-plugin-cloudmanager/package.json

from aio-cli-plugin-cloudmanager.

mstuart2-dxc avatar mstuart2-dxc commented on July 2, 2024

@Iszajek Brilliant! Works like a charm. Thank you very much.

from aio-cli-plugin-cloudmanager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.