@@ -33,6 +33,7 @@ import (
33
33
"github.com/gitpod-io/gitpod/public-api-server/pkg/auth"
34
34
"github.com/gitpod-io/gitpod/public-api-server/pkg/billingservice"
35
35
"github.com/gitpod-io/gitpod/public-api-server/pkg/identityprovider"
36
+ "github.com/gitpod-io/gitpod/public-api-server/pkg/jws"
36
37
"github.com/gitpod-io/gitpod/public-api-server/pkg/oidc"
37
38
"github.com/gitpod-io/gitpod/public-api-server/pkg/origin"
38
39
"github.com/gitpod-io/gitpod/public-api-server/pkg/proxy"
@@ -92,6 +93,15 @@ func Start(logger *logrus.Entry, version string, cfg *config.Configuration) erro
92
93
}
93
94
}
94
95
96
+ keyset , err := jws .NewKeySetFromAuthPKI (cfg .Auth .PKI )
97
+ if err != nil {
98
+ return fmt .Errorf ("failed to setup JWS Keyset: %w" , err )
99
+ }
100
+ _ , err = jws .NewRSA256 (keyset )
101
+ if err != nil {
102
+ return fmt .Errorf ("failed to setup jws.RSA256: %w" , err )
103
+ }
104
+
95
105
var stateJWT * oidc.StateJWT
96
106
if cfg .OIDCClientJWTSigningSecretPath != "" {
97
107
oidcClientJWTSigningSecret , err := readSecretFromFile (cfg .OIDCClientJWTSigningSecretPath )
@@ -126,11 +136,6 @@ func Start(logger *logrus.Entry, version string, cfg *config.Configuration) erro
126
136
log .Info ("No Personal Access Token signign key specified, PersonalAccessToken service will be disabled." )
127
137
}
128
138
129
- _ , err = auth .NewJWTFromAuthPKI (cfg .Auth .PKI , 7 * 24 * time .Hour , "TODO" )
130
- if err != nil {
131
- return fmt .Errorf ("failed to setup JWT signer/verifier: %w" , err )
132
- }
133
-
134
139
srv .HTTPMux ().Handle ("/stripe/invoices/webhook" , handlers .ContentTypeHandler (stripeWebhookHandler , "application/json" ))
135
140
136
141
oidcService := oidc .NewService (cfg .SessionServiceAddress , dbConn , cipherSet , stateJWT )
0 commit comments