Put a Type on the Secrets that we create for FederationDomain JWKS

Signed-off-by: Aram Price <pricear@vmware.com>
This commit is contained in:
Ryan Richard
2020-12-17 14:48:49 -08:00
committed by Aram Price
parent 780d236d89
commit b27e3e1a89
3 changed files with 34 additions and 0 deletions

View File

@@ -129,6 +129,9 @@ func TestSupervisorSecrets(t *testing.T) {
func ensureValidJWKS(t *testing.T, secret *corev1.Secret) {
t.Helper()
// Ensure the secret has the right type.
require.Equal(t, "secrets.pinniped.dev/federation-domain-jwks", secret.Type)
// Ensure the secret has an active key.
jwkData, ok := secret.Data["activeJWK"]
require.True(t, ok, "secret is missing active jwk")