Skip to content

Conversation

@sorindumitru
Copy link
Collaborator

@sorindumitru sorindumitru commented Dec 29, 2025

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

Description of change
This adds support in spire-server for minting WIT-SVIDs using the MintWITSVID API. The BatchNewWITSVID APIs are also implemented, but are currently unused.

Which issue this PR fixes
fixes #6374

@sorindumitru sorindumitru changed the title Wit sign Add support for minting WIT-SVIDs Dec 29, 2025
@sorindumitru sorindumitru force-pushed the wit-sign branch 2 times, most recently from aef8c43 to aa9d8cb Compare January 3, 2026 09:53
Signed-off-by: Sorin Dumitru <sorin@returnze.ro>
Signed-off-by: Sorin Dumitru <sorin@returnze.ro>
Signed-off-by: Sorin Dumitru <sorin@returnze.ro>
Signed-off-by: Sorin Dumitru <sorin@returnze.ro>
Signed-off-by: Sorin Dumitru <sorin@returnze.ro>
PublicKey: jose.JSONWebKey{
Key: publicKey,
},
// TODO: add its own TTL
Copy link
Member

Choose a reason for hiding this comment

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

It would be good to mention https://github.com/spiffe/go-spiffe/issues/373 here.


for format in pretty json; do
for keyType in ec-p256 ec-p384 rsa-2048 rsa-4096; do
docker compose exec -T spire-server /opt//spire/bin/spire-server \
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
docker compose exec -T spire-server /opt//spire/bin/spire-server \
docker compose exec -T spire-server /opt/spire/bin/spire-server \

done

# Check that we can specify a custom TTL
docker compose exec -T spire-server /opt//spire/bin/spire-server \
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
docker compose exec -T spire-server /opt//spire/bin/spire-server \
docker compose exec -T spire-server /opt/spire/bin/spire-server \

wit mint -spiffeID "spiffe://domain.test/workload" -ttl 60s || fail-now "could not mint WIT-SVID with custom TTL"

# Check that WIT-SVID can be written to a directory
docker compose exec -T spire-server /opt//spire/bin/spire-server \
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
docker compose exec -T spire-server /opt//spire/bin/spire-server \
docker compose exec -T spire-server /opt/spire/bin/spire-server \

"jwt mint": func() (cli.Command, error) {
return jwt.NewMintCommand(), nil
},
"wit mint": func() (cli.Command, error) {
Copy link
Member

Choose a reason for hiding this comment

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

I think that we should only expose wit commands if the feature flag is enabled.
It's unfortunate that we can't use the fflag package at this point, because fflags are not loaded until we load the config in Run.

You can refer to https://github.com/spiffe/spire/pull/5586/changes#diff-f06b238782ee9be14f22b6719b32075f5a2ec8c96fe6d2fd4885e74326d98d05L146 for an example of how we implemented this when we had the force rotation work in progress. We should probably have a better solution for this.

Signed-off-by: Sorin Dumitru <sorin@returnze.ro>
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.

WIT-SVID: Implement the MintWITSVID rpc in the SVID API

2 participants