spiffe / spire

The SPIFFE Runtime Environment
https://spiffe.io
Apache License 2.0
1.79k stars 471 forks source link

Taint fields of JWTKey and X509Certificate are not exposed in the spire-plugin-sdk. #5484

Closed hiyosi closed 1 month ago

hiyosi commented 1 month ago

Taint fields have been used since https://github.com/spiffe/spire/pull/5340. However those fields are not exposed in the spire-plugin-sdk repository. It causes build errors if github.com/spiffe/spire v1.10.3 and github.com/spiffe/spire-api-sdk v1.10.3 are specified in go.mod in the external repository.

errors

# github.com/spiffe/spire/pkg/common/coretypes/jwtkey
../../../../pkg/mod/github.com/spiffe/spire@v1.10.3/pkg/common/coretypes/jwtkey/apitypes.go:27:74: pb.Tainted undefined (type *"github.com/spiffe/spire-plugin-sdk/proto/spire/plugin/types".JWTKey has no field or method Tainted)
../../../../pkg/mod/github.com/spiffe/spire@v1.10.3/pkg/common/coretypes/jwtkey/plugintypes.go:10:66: pb.Tainted undefined (type *"github.com/spiffe/spire-plugin-sdk/proto/spire/plugin/types".JWTKey has no field or method Tainted)
../../../../pkg/mod/github.com/spiffe/spire@v1.10.3/pkg/common/coretypes/jwtkey/plugintypes.go:37:3: unknown field Tainted in struct literal of type "github.com/spiffe/spire-plugin-sdk/proto/spire/plugin/types".JWTKey
# github.com/spiffe/spire/pkg/common/coretypes/x509certificate
../../../../pkg/mod/github.com/spiffe/spire@v1.10.3/pkg/common/coretypes/x509certificate/plugintypes.go:12:37: pb.Tainted undefined (type *"github.com/spiffe/spire-plugin-sdk/proto/spire/plugin/types".X509Certificate has no field or method Tainted)
../../../../pkg/mod/github.com/spiffe/spire@v1.10.3/pkg/common/coretypes/x509certificate/plugintypes.go:37:3: unknown field Tainted in struct literal of type "github.com/spiffe/spire-plugin-sdk/proto/spire/plugin/types".X509Certificate
../../../../pkg/mod/github.com/spiffe/spire@v1.10.3/pkg/common/coretypes/x509certificate/plugintypes.go:87:3: unknown field Tainted in struct literal of type "github.com/spiffe/spire-plugin-sdk/proto/spire/plugin/types".X509Certificate
../../../../pkg/mod/github.com/spiffe/spire@v1.10.3/pkg/common/coretypes/x509certificate/plugintypes.go:102:3: unknown field Tainted in struct literal of type "github.com/spiffe/spire-plugin-sdk/proto/spire/plugin/types".X509Certificate
amartinezfayo commented 1 month ago

Thank you @hiyosi for bringing this up. We will have to make a new SPIRE release to address this.

MarcosDY commented 1 month ago

Released 1.10.4 SDKs and SPIRE core,

Can you verify with latest version? Thanks for reporting this!!!

hiyosi commented 1 month ago

@MarcosDY Thank you for addressing the issue. I confirmed there was no problem.