Skip to content

Commit

Permalink
adding EdDSA (ed25519) to supported algorithms (#129) (#132)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Hoffman <[email protected]>
  • Loading branch information
calvn and chrishoffman authored Aug 17, 2020
1 parent 83f6a58 commit 8a9339e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion path_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/hashicorp/vault/sdk/helper/strutil"
"github.com/hashicorp/vault/sdk/logical"
"golang.org/x/oauth2"
jose "gopkg.in/square/go-jose.v2"
)

const (
Expand Down Expand Up @@ -258,7 +259,7 @@ func (b *jwtAuthBackend) pathConfigWrite(ctx context.Context, req *logical.Reque
// default to e.g. "none".
for _, a := range config.JWTSupportedAlgs {
switch a {
case oidc.RS256, oidc.RS384, oidc.RS512, oidc.ES256, oidc.ES384, oidc.ES512, oidc.PS256, oidc.PS384, oidc.PS512:
case oidc.RS256, oidc.RS384, oidc.RS512, oidc.ES256, oidc.ES384, oidc.ES512, oidc.PS256, oidc.PS384, oidc.PS512, string(jose.EdDSA):
default:
return logical.ErrorResponse(fmt.Sprintf("Invalid supported algorithm: %s", a)), nil
}
Expand Down

0 comments on commit 8a9339e

Please sign in to comment.