Add pelican credentials token setup command for standalone credential file creation#3143
Open
Add pelican credentials token setup command for standalone credential file creation#3143
pelican credentials token setup command for standalone credential file creation#3143Conversation
Copilot
AI
changed the title
[WIP] Add standalone client credential file creation feature
Add Feb 18, 2026
pelican credentials token setup command for standalone credential file creation
bbockelm
requested changes
Feb 18, 2026
Collaborator
bbockelm
left a comment
There was a problem hiding this comment.
Please rebase the branch to a single commit so I can more easily cherry-pick.
Contributor
Author
I'm unable to squash commits because |
e67a5e7 to
9853e44
Compare
- Add Client.CredentialFile parameter to docs/parameters.yaml - Regenerate param files with new Client_CredentialFile parameter - Add Client_CredentialFile override in GetEncryptedConfigName() - Add SaveConfigContentsToFile() for saving credentials to specific paths - Add HasEncryptedPassword() to check if credential file is password-protected - Create credentials_token_setup.go with the setup subcommand - Add --no-password, --credential-file, --read, --write flags - Add tests for new functionality Co-authored-by: bbockelm <1093447+bbockelm@users.noreply.github.com>
9853e44 to
e9bdd8c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extracts credential file creation from the rclone PR (#3085) into a standalone CLI command that acquires OAuth2 tokens and persists them (with refresh token and client credentials) to disk.
New CLI command
Flags:
--read/--write(scope),--no-password(skip encryption),--credential-file(custom output path).Changes
docs/parameters.yaml— NewClient.CredentialFileparameter to override default credential file pathparam/— Regenerated viago generateto exposeClient_CredentialFileconfig/encrypted.goGetEncryptedConfigName()respectsClient.CredentialFileoverrideSaveConfigContentsToFile(config, path, withPassword)— writes credentials to a specific path, optionally unencryptedHasEncryptedPassword()— checks if credential file uses password-protected PEMcmd/credentials_token_setup.go— Newsetupsubcommand wired intocredentials tokencmd/config_mgr.go— Wiresetupinto the existingcredentials tokencommand treeconfig/credential_file_test.go— Tests forSaveConfigContentsToFile,HasEncryptedPassword, andGetEncryptedConfigNameoverride including a roundtrip testWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
abc123/tmp/go-build3488651583/b001/config.test /tmp/go-build3488651583/b001/config.test -test.paniconexit0 -test.timeout=10m0s -test.v=true -test.count=1 sdk-for-go/sdk/a-Wl,--export-dynamic-symbol=main om/pressly/goose/tmp/go-link-1142583669/trivial.c rg/toolchain@v0.0.1-go1.25.0.lin-importcfg --gdwarf-5 p mpile rg/toolchain@v0.-buildtags knNv�� @v1.3.2/protoc-g-errorsas @v1.3.2/protoc-g-ifaceassert ux-amd64/pkg/tool/linux_amd64/vet abis o/sdk/internal/e-unsafeptr=false --64 ux-amd64/pkg/too/tmp/go-build1551708337/b359/vet.cfg(dns block)/tmp/go-build1296534582/b001/config.test /tmp/go-build1296534582/b001/config.test -test.paniconexit0 -test.timeout=10m0s -test.v=true -test.count=1 1.67.3/internal/-errorsas om/dlclark/regex-ifaceassert ux-amd64/pkg/tool/linux_amd64/vet --gdwarf-5 --64 l/linux_amd64/co-o ux-amd64/pkg/too/tmp/ccfr49sc.o -I g_.a om/aws/aws-sdk-go@v1.45.25/aws/endpoints/defaultgithub.com/GehirnInc/crypt/common rg/toolchain@v0.0.1-go1.25.0.linux-amd64/pkg/tool/linux_amd64/compile --gdwarf-5 channelz mpile rg/toolchain@v0.-o(dns block)cilogon.org/tmp/go-build3488651583/b001/config.test /tmp/go-build3488651583/b001/config.test -test.paniconexit0 -test.timeout=10m0s -test.v=true -test.count=1 sdk-for-go/sdk/a-Wl,--export-dynamic-symbol=main om/pressly/goose/tmp/go-link-1142583669/trivial.c rg/toolchain@v0.0.1-go1.25.0.lin-importcfg --gdwarf-5 p mpile rg/toolchain@v0.-buildtags knNv�� @v1.3.2/protoc-g-errorsas @v1.3.2/protoc-g-ifaceassert ux-amd64/pkg/tool/linux_amd64/vet abis o/sdk/internal/e-unsafeptr=false --64 ux-amd64/pkg/too/tmp/go-build1551708337/b359/vet.cfg(dns block)/tmp/go-build1296534582/b001/config.test /tmp/go-build1296534582/b001/config.test -test.paniconexit0 -test.timeout=10m0s -test.v=true -test.count=1 1.67.3/internal/-errorsas om/dlclark/regex-ifaceassert ux-amd64/pkg/tool/linux_amd64/vet --gdwarf-5 --64 l/linux_amd64/co-o ux-amd64/pkg/too/tmp/ccfr49sc.o -I g_.a om/aws/aws-sdk-go@v1.45.25/aws/endpoints/defaultgithub.com/GehirnInc/crypt/common rg/toolchain@v0.0.1-go1.25.0.linux-amd64/pkg/tool/linux_amd64/compile --gdwarf-5 channelz mpile rg/toolchain@v0.-o(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.