Skip to content

feat(clef-on-fleets): use IAM trusted profile instead of API key - #540

Open
Josip-Ledic wants to merge 1 commit into
mainfrom
feat/clef-on-fleets-trusted-profile
Open

Josip-Ledic wants to merge 1 commit into
mainfrom
feat/clef-on-fleets-trusted-profile

Conversation

@Josip-Ledic

Copy link
Copy Markdown
Collaborator

Summary

The clef-on-fleets function no longer needs an IBM Cloud API key. It uses an IAM trusted profile: Code Engine mounts a compute resource token into the function, and the function exchanges it at IAM for a bearer token. That token is used for both the Code Engine add_tasks call and the COS result polling.

Validated end to end against a live Code Engine project. Deploy creates the profile, link and policies. Re-running creates no duplicates.

The function now exchanges its Code Engine compute resource token for an
IAM token, replacing the CE_API_KEY secret.

- function: authenticate via trusted profile; fix NameError in 202 response
- 3_deploy_function: idempotently create the profile, link, and policies;
  deploy with --trusted-profiles-enabled
- README: document the new setup

@Luke-Roy-IBM Luke-Roy-IBM left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Changes look good 👍 Thanks a lot @Josip-Ledic

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants