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 field delegated identity API #4074

Merged

Conversation

guilhermocc
Copy link
Contributor

@guilhermocc guilhermocc commented Apr 13, 2023

Pull Request check list

  • Commit conforms to CONTRIBUTING.md?
  • Proper tests/regressions included?
  • Documentation updated?

Affected functionality
Delegated API FetchJWTSVIDs and SubscribeToX509SVIDs methods.

Description of change
Add hint field to delegated API responses

Which issue this PR fixes
Ongoing work for #2588

Dependencies
This PR depends on spiffe/spire-api-sdk#39; please review it first before merging this PR.

@guilhermocc guilhermocc changed the title Add hint field delegated identity v1 Add hint field delegated identity Apr 13, 2023
go.mod Outdated Show resolved Hide resolved
@guilhermocc guilhermocc changed the title Add hint field delegated identity Add hint field delegated identity API Apr 13, 2023
Signed-off-by: Guilherme Carvalho <guilhermocc@proton.me>
Signed-off-by: Guilherme Carvalho <guilhermocc@proton.me>
Signed-off-by: Guilherme Carvalho <guilhermocc@proton.me>
Signed-off-by: Guilherme Carvalho <guilhermocc@proton.me>
@guilhermocc guilhermocc force-pushed the add-hint-field-delegated-identity-v1 branch from 0881a7f to 039fa18 Compare April 13, 2023 17:30
Signed-off-by: Guilherme Carvalho <guilhermocc@proton.me>
},
jwtSVIDsResp: map[spiffeid.ID]*client.JWTSVID{
id1: {
Token: jwtSVID1.Marshal(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

NIT: since you are using marshal for the very same token multiple times, what do you think about moving that into a variable? and just use vars here?

Svids: []*types.JWTSVID{
{
Token: jwtSVID1.Marshal(),
Id: &types.SPIFFEID{TrustDomain: id1.TrustDomain().String(), Path: id1.Path()},
Copy link
Collaborator

Choose a reason for hiding this comment

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

mmm, how about using api.ProtoFromID()?

Signed-off-by: Guilherme Carvalho <guilhermocc@proton.me>
@MarcosDY MarcosDY merged commit b136492 into spiffe:main Apr 17, 2023
@amartinezfayo amartinezfayo added this to the 1.6.4 milestone Apr 20, 2023
Basavaraju-G pushed a commit to Basavaraju-G/spire that referenced this pull request May 3, 2023
Add hint field delegated identity API

Signed-off-by: Guilherme Carvalho <guilhermocc@proton.me>
Signed-off-by: Basavaraju-G <basavaraju013@gmail.com>
d-goro pushed a commit to d-goro/spire that referenced this pull request May 18, 2023
Add hint field delegated identity API

Signed-off-by: Guilherme Carvalho <guilhermocc@proton.me>
Signed-off-by: Dmitry Gorochovsky <d.goro@yahoo.com>
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.

4 participants