-
Notifications
You must be signed in to change notification settings - Fork 64
Description
Attempting to use the SDK sample code but it fails because it is unable to retrieve the RPST token.
/**
- Copyright (c) 2020, 2021 Oracle and/or its affiliates. All rights reserved.
- This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
*/
/**
- This is an example that shows how to use oke workload identity auth provider
*/
var identity = require("oci-identity");
var common = require("oci-common");
(async () => {
const authProvider = await common.OkeWorkloadIdentityAuthenticationDetailsProvider.builder();
const compartmentId = await authProvider.getStringClaim("res_tenant");
const identityClient = new identity.IdentityClient({
authenticationDetailsProvider: authProvider
});
identityClient.close();
})();
/app/node_modules/oci-common/lib/auth/X509-federation-client-for-oke-workload-identity.js:169
throw Error(Failed to call Proxymux, error: ${e}. ${OKE_WORKLOAD_IDENTITY_GENERIC_ERROR});
^
Error: Failed to call Proxymux, error: TypeError: fetch failed. Failed to get a RPST token from Proxymux. See https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contenggrantingworkloadaccesstoresources.htm for more info.
at X509FederationClientForOkeWorkloadIdentity. (/app/node_modules/oci-common/lib/auth/X509-federation-client-for-oke-workload-identity.js:169:23)
at Generator.throw ()
at rejected (/app/node_modules/oci-common/lib/auth/X509-federation-client-for-oke-workload-identity.js:10:65)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v20.15.0