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 FetchJWTSVIDs function for workloadapi and jwtSource #187

Merged
merged 7 commits into from Apr 29, 2022

Conversation

loveyana
Copy link
Contributor

Signed-off-by: Yuhan Li liyuhan.loveyana@bytedance.com

Add FetchJWTSVIDs method for workloadapi to fetch all jwt-svids, which are provided to the client side for filtering under workload scenarios with multiple registration information.

Signed-off-by: Yuhan Li <liyuhan.loveyana@bytedance.com>
Copy link
Member

@azdagron azdagron left a comment

Choose a reason for hiding this comment

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

Thanks @loveyana ! Just one small comment.

svids = append(svids, s)
}

if len(svids) == 0 {
Copy link
Member

Choose a reason for hiding this comment

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

This check should move above the for loop and check the length of SVIDs in the response, otherwise, if the response has no SVIDs and firstOnly is true, we will panic on line 445.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, I directly copied the code of parseX509SVIDs and modified it. I didn't notice it here. I think parseX509SVIDs also has this problem, so I modified it at the same time.
In addition, I would like to ask about java-spiffe, this spiffe/java-spiffe#90 not assigned to reviewer, any idea?

Copy link
Member

Choose a reason for hiding this comment

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

I would like to ask about java-spiffe, this spiffe/java-spiffe#90 not assigned to reviewer, any idea?

@loveyana I'm reviewing it today.

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 would like to ask about java-spiffe, this spiffe/java-spiffe#90 not assigned to reviewer, any idea?

@loveyana I'm reviewing it today.

In addition, I may need help to look at the HewlettPackard/py-spiffe#105. It seems that the lint in CI on the py-spiffe side is wrong, but I passed it locally, and it seems that the previous pr also has the same problem. I hope you can help and review it at the same time

Signed-off-by: Yuhan Li <liyuhan.loveyana@bytedance.com>
Copy link
Member

@azdagron azdagron left a comment

Choose a reason for hiding this comment

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

Thanks, @loveyana !

@azdagron azdagron merged commit 23ed83e into spiffe:main Apr 29, 2022
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.

None yet

3 participants