Skip to content

Conversation

@jsnctl
Copy link
Member

@jsnctl jsnctl commented Nov 4, 2025

  • Uses WIMSEIDString() for sub and validation methods

@jsnctl jsnctl added this to the now milestone Nov 4, 2025
@jsnctl jsnctl self-assigned this Nov 4, 2025
@gemini-code-assist
Copy link

Summary of Changes

Hello @jsnctl, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the handling of Workload Identity Token - SPIFFE Verifiable Identity Documents (WIT-SVIDs) to align with the WIMSE specification. It includes an update to a core dependency and introduces a dedicated validation method, ensuring that WIT-SVIDs are correctly formatted and validated, particularly concerning the subject claim and token lifecycle. This change enhances the robustness and compliance of WIT-SVID generation and verification.

Highlights

  • Dependency Update: The github.com/cofide/cofide-sdk-go dependency has been updated from version v0.4.0 to v0.4.1.
  • WIMSE ID String for WIT-SVID 'sub' claim: The 'sub' claim within Workload Identity Token - SPIFFE Verifiable Identity Documents (WIT-SVIDs) now utilizes the WIMSEIDString() format from the cofide-sdk-go library, ensuring compliance with the WIMSE specification.
  • Dedicated WIT-SVID Validation Method: A new method, ValidateWorkloadWITSVID, has been introduced to specifically validate WIT-SVIDs. This method includes checks for the correct WIMSE ID string format in the 'sub' claim and proper token expiry.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly updates the cofide-sdk-go dependency and refactors the WIT-SVID creation to use the WIMSEIDString() method for the sub claim. It also introduces a dedicated ValidateWorkloadWITSVID function, which fixes a bug where the incorrect validation function for JWT-SVIDs was being used. The changes look good and improve the correctness of the implementation. I've added a few suggestions to improve the error messages in the new validation function to make them clearer and more helpful for debugging.

@jsnctl jsnctl merged commit fb9dac8 into main Nov 4, 2025
1 check passed
@jsnctl jsnctl deleted the jsnctl/wimse-prefix branch November 4, 2025 15:42
@@ -4,6 +4,8 @@ github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 h1:MzBOUgng9or
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129/go.mod h1:rFgpPQZYZ8vdbc+48xibu8ALc3yeyd64IhHS+PU6Yyg=
github.com/cofide/cofide-sdk-go v0.4.0 h1:1mbn1Slszz3onkp5SHf332MRDJE4ui4uie5Z2OZmhjQ=
github.com/cofide/cofide-sdk-go v0.4.0/go.mod h1:MJ0iPUH0AmYZebiH5trHRWMvvBo+jLc5J4HwY7bcS0g=
Copy link
Member

Choose a reason for hiding this comment

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

Probably missed go mod tidy here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well spotted, fix here #12

I don't think we need another release for this as the functionality should be OK for the WIMSE proof-of-concept rig at v0.2.1 despite this

Copy link
Member

Choose a reason for hiding this comment

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

Correct.

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