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

Add hint support #242

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Add hint support #242

wants to merge 12 commits into from

Conversation

kfox1111
Copy link
Contributor

Fixes: #113

Signed-off-by: Kevin Fox <[email protected]>
pkg/disk/json.go Outdated Show resolved Hide resolved
pkg/disk/json.go Outdated Show resolved Hide resolved
pkg/disk/json.go Outdated Show resolved Hide resolved
pkg/disk/x509.go Outdated Show resolved Hide resolved
pkg/sidecar/sidecar.go Show resolved Hide resolved
pkg/sidecar/sidecar.go Outdated Show resolved Hide resolved
@faisal-memon faisal-memon added this to the 0.10.0 milestone Jan 28, 2025
README.md Outdated Show resolved Hide resolved
pkg/sidecar/config.go Outdated Show resolved Hide resolved
return os.WriteFile(filePath, []byte(jwtSVID.Marshal()), jwtSVIDFileMode)
}

func getJWTByHint(jwtSVIDs []*jwtsvid.SVID, hint string) *jwtsvid.SVID { // Choose a better name :D
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workload api has a WithDefaultJWTSVIDPicker filter. What do you think of structuring this slightly differently by using this to filter svids by hint through the worklaod api. Then the logic in this library will be unchanged and simpler just to write to everything to disk.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I was digging through the code, I didn't find an easy way to apply that filter. Maybe I missed something though. Do you know where in the code we could do that?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea youre right. Its not available through the APIs we are using.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marcos was talking about maybe a major refactoring at some point of the spiffe-helper. Maybe that would be a good time to consider refactoring that part of this PR?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you be able to move the logic to filter by hint to pkg/sidecar.go? I think thats a better place for this code to live. If not I can do that after merging this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked into this a little bit. Would totally have to rewrite the sidecar tests / disk tests which is a good chunk of work. I'm ok doing that, but it would be nice to be able to start using this soon as well. Can we push this pr through and then rework it after release?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good

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

Successfully merging this pull request may close these issues.

spiffeid hint
3 participants