Skip to content
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

Make --identity-token an alias of --password #742

Closed
1 task
shizhMSFT opened this issue Jan 10, 2023 · 13 comments · Fixed by #1294
Closed
1 task

Make --identity-token an alias of --password #742

shizhMSFT opened this issue Jan 10, 2023 · 13 comments · Fixed by #1294
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@shizhMSFT
Copy link
Contributor

What is the version of your ORAS CLI

v0.16.0

What would you like to be added?

Make --identity-token an alias of --password

Why is this needed for ORAS?

oras supports using identity token as the credential without a username.

The UX of oras login $REGISTRY --password $TOKEN does not seem good enough. It will be better if it is

oras login $REGISTRY --identity-token $TOKEN

Are you willing to submit PRs to contribute to this feature?

  • Yes, I am willing to implement it.
@shizhMSFT shizhMSFT added the enhancement New feature or request label Jan 10, 2023
@qweeah
Copy link
Contributor

qweeah commented Jan 11, 2023

What if a user mistakenly use oras login $REGISTRY --username $USERNAME --identity-token $TOKEN

@shizhMSFT
Copy link
Contributor Author

What if a user mistakenly use oras login $REGISTRY --username $USERNAME --identity-token $TOKEN

I think we should return error for this case.

@rafiya2003
Copy link

I would like to work on this

@qweeah
Copy link
Contributor

qweeah commented Jun 7, 2023

@rafiya2003 If you have any questions, feel free to join oras slack and ping me

@qweeah
Copy link
Contributor

qweeah commented Jun 7, 2023

Not all registry support token refreshing from identity token to registry token. E.g. ghcr returns 405 for token refreshing.

@shizhMSFT We should also add a flag --registry-token allow user to use registry token in oras commands.

@qweeah qweeah mentioned this issue Jun 7, 2023
1 task
@shizhMSFT
Copy link
Contributor Author

Not all registry support token refreshing from identity token to registry token. E.g. ghcr returns 405 for token refreshing.

@shizhMSFT We should also add a flag --registry-token allow user to use registry token in oras commands.

That can be another issue and I noticed that you have created one #968

@sbdtu5498
Copy link

I have completed the implementation. Will try to push it soon,

@qweeah qweeah assigned sbdtu5498 and unassigned rafiya2003 Jun 28, 2023
@qweeah
Copy link
Contributor

qweeah commented Jul 12, 2023

@sbdtu5498 Any update on this?

@sbdtu5498
Copy link

Oh sorry for the delays. I was busy with some other stuff and left the task hanging. Will push it before Monday.

@qweeah
Copy link
Contributor

qweeah commented Aug 1, 2023

@shizhMSFT Do we also need --registry-token-stdin?

@shizhMSFT
Copy link
Contributor Author

@shizhMSFT Do we also need --registry-token-stdin?

SGTM but is that --identity-token-stdin?

@qweeah
Copy link
Contributor

qweeah commented Aug 3, 2023

@sbdtu5498 So we need to add another flag to enable read identity token from stdin like:

echo $TOKEN | oras login $REGISTRY --identity-token-stdin 

@sbdtu5498
Copy link

Sure, will do it ASAP. Sorry for the delayed response.

@yizha1 yizha1 modified the milestones: v1.2.0, v1.3.0 Dec 26, 2023
@qweeah qweeah removed this from the v1.3.0 milestone Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment