mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-10 01:10:42 +03:00
🚀 Feature: Allow uploading jwks file for federated credentials #9
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @userbradley on GitHub.
Feature description
When working with Kubernetes jwks, the Kubernetes API is using a self signed cert, meaning that pocket id can't get the jwks file and validate it.
I would like to see the ability to upload this file to Pocket ID
A good example is how GCP does this for their Federated Kubernetes IAM:
https://cloud.google.com/iam/docs/workload-identity-federation-with-kubernetes
Which is then used later:
This nicely get's around having to host the jwks file on a public endpoint, much like how AWS make you do:
https://github.com/aws/amazon-eks-pod-identity-webhook/blob/master/SELF_HOSTED_SETUP.md
Pitch
I am writing an app that runs in k8s that reaches out to Mealie, and then emails me tonights dinner.
I have Mealie behind Pocket ID which means that I need to authenticate using a users token. By instead using federated credentials, I can have Kubernetes be a user and make API requests instead of being based on a user.
The reason I'd like to see the ability to upload the jwks file is the same as AWS's reason, the cluster should not be public and there's no way for Pocket ID to access these keys otherwise.
@michaelbeaumont commented on GitHub:
For the record, for this problem specifically, what you can also do is put the CA, i.e.
clusters[].cluster.certificate-authority-datafrom your Kubeconfig, into/etc/ssl/certsandpocket-idwill pick it up.@ItalyPaleAle commented on GitHub:
The federation implemented in Pocket ID today is for client authentication (client = apps), not for authenticating resource owners (users or other kinds of “principals”). So this wouldn’t help in your case either way.
However, I do think the solution that @michaelbeaumont suggested, of adding the CA certs so Pocket ID can use them, would be better suited here…
@userbradley commented on GitHub:
Turns out I have misunderstood what this is for, RE my use case.
But the general idea stands that it would be nice to be able to upload the jwks to Pocket ID