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

Refactor ftl secret --op so that it manages writes as well #1537

Closed
alecthomas opened this issue May 19, 2024 · 0 comments
Closed

Refactor ftl secret --op so that it manages writes as well #1537

alecthomas opened this issue May 19, 2024 · 0 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@alecthomas
Copy link
Collaborator

alecthomas commented May 19, 2024

Currently (by design) the 1Password secret provider requires references to existing password entries. This was by design to allow use of existing passwords, but it turns out that in practice this is both tedious and not used much. Let's change how this works such that 1Password works like all the other providers, managing setting the secrets directly as well. It might be easiest to just convert the existing

type OnePasswordProvider struct {
	OnePassword bool `name:"op" help:"Write 1Password secret references - does not write to 1Password." group:"Provider:" xor:"configwriter"`
}

To:

type OnePasswordProvider struct {
	OnePassword string `name:"op" help:"Manage secrets in this 1Password vault." group:"Provider:" xor:"configwriter" placeholder:"VAULT"`
}

Usage would then be something like this:

echo myPassword | ftl secret set --op myVault module.secretName

It would continue to prompt for the password if reading from stdin.

This would internally use the op reference op://myVault/module.secretName/secret or similar. The reference in ftl-project.toml is now in the format of op://vault with no reference to 1password items or fields.

Similarly, get will now assume the secret location based on the module name:

ftl secret get module.secretName
"hunter1"

This will look in the "myVault" vault for an entry called "module.secretName".

@alecthomas alecthomas added the good first issue Good for newcomers label May 19, 2024
@ftl-robot ftl-robot mentioned this issue May 19, 2024
@gak gak closed this as completed in 8086136 May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants