spiffe / spiffe-helper

The SPIFFE Helper is a tool that can be used to retrieve and manage SVIDs on behalf of a workload
Apache License 2.0
40 stars 39 forks source link

Add configuration to exit after retrieving JWTs (closes #121) #132

Closed keeganwitt closed 1 month ago

kfox1111 commented 6 months ago

Why two flags? There ever going to be a case where both jwt and x509 are enabled at the same time? If so, it probably should wait for both? If two flags, it may be confusing in that case.

faisal-memon commented 6 months ago

Im planning to do a small refactor to create a daemon mode flag. when disabled will just download the x509 and/or JWTs and then exit. That should cover this with only a single flag.

keeganwitt commented 6 months ago

Why two flags? There ever going to be a case where both jwt and x509 are enabled at the same time? If so, it probably should wait for both? If two flags, it may be confusing in that case.

Yes, I was thinking some use cases might require both. Ideally, yes, it would wait for both. But I wasn't sure how to implement that, particularly since there might be multiple JWTs. If someone can guide me with an idea, I'll give it a shot.

faisal-memon commented 1 month ago

@keeganwitt Finally got around to creating the PR i mentioned above with a single daemon_mode flag. Please take a look and lmk if its ok to close this PR. https://github.com/spiffe/spiffe-helper/pull/161

keeganwitt commented 1 month ago

Conceptually, yea, think that will solve what I was trying to do here.