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

Keyring core support for standalone keys/tokens #110

Open
mdrovdahl opened this issue May 2, 2023 · 3 comments
Open

Keyring core support for standalone keys/tokens #110

mdrovdahl opened this issue May 2, 2023 · 3 comments

Comments

@mdrovdahl
Copy link
Contributor

mdrovdahl commented May 2, 2023

While writing a proof-of-concept importer for the 1Password Events API, I wanted to store the API token in Keyring and leverage the Keyring Social Importer framework (for continuous import). The 1Password API token is generated in a standalone manner on 1Password.com (not an OAuth flow). From what I could tell, there are no existing Keying Services for such a use-case, where the input to Keyring is a pre-generated token.

For my purposes, I implement this as a new "Core" service (token.php) which accepts for input via UI a key/token, stores it, does the basic validation request and then makes it available via standard Keyring methods.

I think this use-case may have overlap with what @pablinos has written up in #93 and probably has more general use as well.

So, my question is...does this approach make sense? As a new "Core" service? If so, I'm happy to share my code...though it will definitely need review, as it's prototype quality, not production "ready", and only used on my local machine.

There are obviously more lightweight ways to store a key in the database, but I like the idea of centralizing key/token storage within Keyring. Hope you do too =)

cc: @beaulebens

@beaulebens
Copy link
Owner

What you've described makes sense to me, and does have a certain elegance (symmetry?) to it.

I'm definitely curious to see what you had to write to make it work -- I'm picturing there being a lot of stubs for your Service definition, but maybe that's not such a big deal.

@mdrovdahl
Copy link
Contributor Author

Alright then, I'll polish it up a bit and get it ready to share =)

@mdrovdahl
Copy link
Contributor Author

Well, let's give this a try #111

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

No branches or pull requests

2 participants