File tree Expand file tree Collapse file tree 3 files changed +2
-21
lines changed Expand file tree Collapse file tree 3 files changed +2
-21
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ class TestAuthJWT {
76
76
const encoded = await sign ( { } , keypair . privateKey , {
77
77
algorithm : "RS512" ,
78
78
expiresIn : "1d" ,
79
- issuer : "https://mp-server-d7650ec945.preview.gitpod-dev.com" ,
79
+ issuer : this . config . hostUrl . toStringWoRootSlash ( ) ,
80
80
keyid : keypair . id ,
81
81
subject,
82
82
} ) ;
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ export function registerServerMetrics(registry: prometheusClient.Registry) {
26
26
registry . registerMetric ( spicedbClientLatency ) ;
27
27
registry . registerMetric ( dashboardErrorBoundary ) ;
28
28
registry . registerMetric ( jwtCookieIssued ) ;
29
- registry . registerMetric ( sessionsWithJWTs ) ;
30
29
}
31
30
32
31
const loginCounter = new prometheusClient . Counter ( {
@@ -68,16 +67,6 @@ export function reportJWTCookieIssued() {
68
67
jwtCookieIssued . inc ( ) ;
69
68
}
70
69
71
- const sessionsWithJWTs = new prometheusClient . Counter ( {
72
- name : "gitpod_server_sessions_with_jwts_total" ,
73
- help : "Total number of sessions which did/or did not contain JWTs" ,
74
- labelNames : [ "present" ] ,
75
- } ) ;
76
-
77
- export function reportSessionHasJWT ( jwtPresent : boolean ) {
78
- sessionsWithJWTs . inc ( { present : `${ jwtPresent } ` } ) ;
79
- }
80
-
81
70
const apiConnectionClosedCounter = new prometheusClient . Counter ( {
82
71
name : "gitpod_server_api_connections_closed_total" ,
83
72
help : "Total amount of closed API connections" ,
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ import { log } from "@gitpod/gitpod-protocol/lib/util/logging";
16
16
import { Config as DBConfig } from "@gitpod/gitpod-db/lib/config" ;
17
17
import { Config } from "./config" ;
18
18
import { GitpodHostUrl } from "@gitpod/gitpod-protocol/lib/util/gitpod-host-url" ;
19
- import { reportSessionHasJWT } from "./prometheus-metrics" ;
20
19
21
20
@injectable ( )
22
21
export class SessionHandlerProvider {
@@ -41,14 +40,7 @@ export class SessionHandlerProvider {
41
40
42
41
options . store = this . createStore ( ) ;
43
42
44
- this . sessionHandler = ( req : express . Request , res : express . Response , next : express . NextFunction ) => {
45
- const jwt = req . cookies [ SessionHandlerProvider . getJWTCookieName ( this . config . hostUrl ) ] ;
46
- const containedJWT = ! ! jwt ;
47
-
48
- reportSessionHasJWT ( containedJWT ) ;
49
-
50
- return session ( options ) ( req , res , next ) ;
51
- } ;
43
+ this . sessionHandler = session ( options ) ;
52
44
}
53
45
54
46
protected getCookieOptions ( config : Config ) : express . CookieOptions {
You can’t perform that action at this time.
0 commit comments