It fails even with different user credentials with the appropriate roles: openidm-admin & openidm-authorized. My test instance is running in GKE cluster(1.27.3-gke.100) with Forgeops CDK 7.3 installation. Perhaps, I would like to know an alternative way to authenticate the REST calls for IDM. If anybody knows, please confirm that the openidm admin credential is not the only way to authenticate for accessing the IDM REST endpoints.
I am a bit lost about how to troubleshoot this issue since there is no logs found in the IDM service.
I see you are providing the X-OpenIDM-Username and X-OpenIDM-Password headers, as well as an Authorization header. Only one of those would be necessary. I’m not 100% certain how Forgeops is configured, but on a standalone IDM 7.3 you can just use the X-OpenIDM-* headers. This does however lead to the next item…
While you’ve redacted the value in your Authorization header, I see you used the Basic auth scheme but indicated you were passing in a token (presumably an OAuth2 access token from AM). If that is the case, you would use the Bearer auth scheme in the header. This is hinted at from your response, which contains a www-authenticate response header stating that it wants you to use the the Bearer auth scheme.
I’d suggest exploring both of these options and then tailoring your solution towards the use case that best suits your needs.
I see you are passing the X-OpenIDM-Username and X-OpenIDM-Password headers in your request. Since you have acquired the access token from AM and presumably set up your environment as @patrickdiligent suggested, you should be using that bearer token in your requests. Can you try removing the X-OpenIDM-* headers from your request and replacing them with an Authentication: Bearer <token value> header, where <token value> represents the value of the access token returned from AM?
One last point @jiyun_kang, to access the IDM admin console, don’t forget to set up ui-configuration.json - this indicates to the login UI which OAuth2 client it should use. Then direct your browser to the login UI, and once in the dashboard, you can launch the IDM admin console