Skip to content

[main] Allow CF Authentication based on Tokens - user and client tokens #3397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 14, 2025
Merged

[main] Allow CF Authentication based on Tokens - user and client tokens #3397

merged 1 commit into from
Mar 14, 2025

Conversation

strehle
Copy link
Member

@strehle strehle commented Feb 11, 2025

Note: Please create separate PR for every branch (main, v8 and v7) as needed.

Description of the Change

Enhance the cf auth command with a parameter --assertion. The content of this token should be either a user token in order to perform a jwt-bearer or a client token in order to perform a client_credentials grant with federated trust.

UAA supports JWT bearer since UAA 4.5.0 , see https://docs.cloudfoundry.org/api/uaa/version/77.25.0/index.html#jwt-bearer-token-grant
UAA support the federated client credential flow since 77.25.0

Why Is This PR Valuable?

CF can be integrated into Github Action without any extra secret setup in Github Repo.
Customer can then decide about using external tokens like github action token for user and/or client authentication.

In a PR you retrieve a id_token from gh action, this can be passed with cf auth --assertion so that you are authentication in or to do a cf push ...

Applicable Issues

How Urgent Is The Change?

  • it is an enhancement but it solves security issues, because CF integrations need to omit secrets and/or client certificates, but integration of github action with CF is only possible if you store a secret in Github

Other Relevant Parties

Only CF landscapes with a configured trust to external OIDC parties

@strehle strehle changed the title Allow CF Authentication based on Tokens - user and client tokens [main] Allow CF Authentication based on Tokens - user and client tokens Feb 11, 2025
strehle added a commit to strehle/cmdline-openid-client that referenced this pull request Feb 28, 2025
Used for testing UAA changes with token
exchanges, e.g. cloudfoundry/cli#3397
strehle added a commit to strehle/cmdline-openid-client that referenced this pull request Feb 28, 2025
Used for testing UAA changes with token
exchanges, e.g. cloudfoundry/cli#3397
strehle added a commit to strehle/cmdline-openid-client that referenced this pull request Mar 7, 2025
Used for testing UAA changes with token
exchanges, e.g. cloudfoundry/cli#3397
@strehle
Copy link
Member Author

strehle commented Mar 13, 2025

@a-b Can you give me a timeline about when somebody checks the PR ? There is one failing test but I dont see a relation to my changes.

The extension is for https://github.com/cloudfoundry/community/blob/main/toc/rfc/rfc-0037-deprecate-passwords.md#cf-cli

I will provide PRs for the other repos and also for cf login after that but first I would like to know if you accept this enhancments

Thanks in advance

@a-b
Copy link
Member

a-b commented Mar 14, 2025

Hi. I'll look into this shortly.

@a-b a-b merged commit de83208 into cloudfoundry:main Mar 14, 2025
10 checks passed
@a-b
Copy link
Member

a-b commented Mar 14, 2025

We are currently only releasing from the v8 branch. @strehle, are you planning to create a PR for v8?

@strehle
Copy link
Member Author

strehle commented Mar 14, 2025

We are currently only releasing from the v8 branch. @strehle, are you planning to create a PR for v8?

Ok, yes, sure. Thanks. That was now faster than expected.
@a-b FYI -> V8 PR is: #3454

V7 is out of scope ?

@a-b
Copy link
Member

a-b commented Mar 14, 2025

Yes v7 is out of support.

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