From e2bdb74a05a3baf25f1ecfd6287d05673e23541b Mon Sep 17 00:00:00 2001 From: Chris Hines <chris.hines@monash.edu> Date: Wed, 23 Sep 2020 13:47:04 +1000 Subject: [PATCH] extend lifefime of certs --- src/app/accountinfo/accountinfo.component.html | 2 +- src/app/keygen/keygen.component.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/accountinfo/accountinfo.component.html b/src/app/accountinfo/accountinfo.component.html index 8aa198a..b800992 100644 --- a/src/app/accountinfo/accountinfo.component.html +++ b/src/app/accountinfo/accountinfo.component.html @@ -1,6 +1,6 @@ <div fxLayout="column" fxLayoutAlign="start none" style="width: 100%" class="strudel-accountinfo-typography"> <div *ngIf="nowSeconds(identity$ | async) ; let time"> - Login certificates expire in {{ time }} + Login certificates expire in {{ time }} (or when you 5 minutes after you close this tab, which ever comes first) </div> <div *ngIf="identity$.value !== null && identity$.value !== undefined"> <!--<div *ngIf="identity$.value.systemalerts.value !== null">--> diff --git a/src/app/keygen/keygen.component.ts b/src/app/keygen/keygen.component.ts index 0d3aa06..bcc0716 100644 --- a/src/app/keygen/keygen.component.ts +++ b/src/app/keygen/keygen.component.ts @@ -116,7 +116,8 @@ export class KeygenComponent implements OnInit, OnDestroy { let headers = new HttpHeaders({'Authorization':'Bearer '+token.token}); let options = { headers: headers, withCredentials: false}; var now = new Date() - var end = new Date(now.getTime() + 24*60*60*1000); //request a certificate valid for 24 hours + var end = new Date(now.getTime() + 28*24*60*60*1000); //request a certificate valid for 28 days + //its expected that the user will terminate the session by closing their browser/sleeping their laptop before this let data = {'public_key': key.public, 'end': end.toISOString()}; return this.http.post<any>(token.sshauthzservice.sign,data, options).pipe( tap((v) => console.log('in getCert',v)), -- GitLab