adobe / adobe/aem-project-archetype
Adobe I/O Runtime Stage Authorization
- Dominant language
- JavaScript
- Stars
- 596
- Forks
- 431
- Avg merge
- 10d 6h
- Merged PRs (30d)
- 1
Description
Hi I am trying to find out how to use React component with SSR. So I use this archetype with the -D enableSSR=y flag but I am not able to authorize my request when trigger the build.
### Expected Behaviour
SSR changes deployed successfully
### Actual Behaviour
[INFO] › Error: GET https://adobeioruntime.net/api/v1/namespaces/.....
[INFO] › ab-stage/packages Returned HTTP 401 (Unauthorized) --> "The supplied
[INFO] › authentication is invalid"
### Reproduce Scenario (including but not limited to)
#### Steps to Reproduce
* Created new Adobe IO project on the developer console using the App builder template with I/O runtime
* Enable OAuth Server-to-Server
* Generate access key
* Copy key to the ...
* Copy namespace to ...
* Run the maven build
I can build the project but I can not do it with enabled SSR.
When I specify the "serverSideRender-runtime" profile I see that it tries to deploy the SSR changes but it fails with authorization.
I tried the same for the production environment with the product key but was not able to manage it as well.
So I guess there are two issues, but I can be wrong.
The first one - I am not sure if the "https://adobeioruntime.net" hostname is valid for Adobe I/O Runtime for Stage. If that's true, how can I specify the correct hostname? I can do it in the system console for the Remote Content Renderer, but I can't find how to do it in the Maven build. Changing the value in package.json to
`"deploy-ssr-ioruntime": "cross-env NODE_ENV=stage aio app deploy" `
did not help.
The second issue is probably related to the way I want to get the auth token.
As I mentioned, I tried to use UI for that, and it did not help.
Another way was a curI command. The Bearer token was received but it also did not work.
Also I tried to get it via the aio tool:
aio auth login -b
The command returns the token but it does work, authorization still fails.
So, maybe you can point me to what I am doing wrong? Or there is something I missed?
#### Platform and Version
AEM 6.5 SP 21
Contributor guide
Research direction
Start with the Maven build and the "serverSideRender-runtime" profile, then inspect package.json and its deploy-ssr-ioruntime command. Compare the configured aio.runtime.auth and aio.runtime.namespace values with the Adobe I/O Runtime request that returns HTTP 401, and check the documented aio auth login flow. Done means the enabled-SSR build deploys successfully for the stated stage or production environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- authentication, backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100