diff --git a/README.md b/README.md index f6a8c318f..2b0914ae4 100644 --- a/README.md +++ b/README.md @@ -217,6 +217,7 @@ By default, Leapp writes logs to the following locations: - on Windows: %USERPROFILE%\\AppData\\Roaming\\**Leapp**\\logs\\log.log Logs are structured in the following way: +======= ``` [YYYY-MM-DD HH:mm:ss.mmm] [LEVEL] [rendered/system] [COMPONENT] MESSAGE {Useful Object / Stacktrace Err Object} diff --git a/electron/dist/src/environments/environment.js b/electron/dist/src/environments/environment.js index 91efbf54e..0aec59cde 100644 --- a/electron/dist/src/environments/environment.js +++ b/electron/dist/src/environments/environment.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); var environment = { appName: 'Leapp', - sessionDuration: 1200, + sessionDuration: 30, sessionTokenDuration: 36000, timeout: 10000, lockFileDestination: '', diff --git a/electron/dist/src/environments/environment.js.map b/electron/dist/src/environments/environment.js.map index 451d11177..1c1ca1595 100644 --- a/electron/dist/src/environments/environment.js.map +++ b/electron/dist/src/environments/environment.js.map @@ -1 +1 @@ -{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../../src/environments/environment.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,0EAA0E;AAC1E,gEAAgE;;AAEhE,IAAM,WAAW,GAAG;IAClB,OAAO,EAAE,OAAO;IAChB,eAAe,EAAE,IAAI;IACrB,oBAAoB,EAAE,KAAK;IAC3B,OAAO,EAAE,KAAK;IACd,mBAAmB,EAAE,EAAE;IACvB,cAAc,EAAE,OAAO;IACvB,UAAU,EAAE,KAAK;IACjB,sBAAsB,EAAE,kBAAkB;IAC1C,iBAAiB,EAAE,0BAA0B;IAC7C,YAAY,EAAE,0BAA0B;CACzC,CAAC;AAGO,kCAAW;AADpB,WAAW,CAAC,mBAAmB,GAAG,wBAAwB,CAAC"} \ No newline at end of file +{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../../src/environments/environment.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,0EAA0E;AAC1E,gEAAgE;;AAEhE,IAAM,WAAW,GAAG;IAClB,OAAO,EAAE,OAAO;IAChB,eAAe,EAAE,EAAE;IACnB,oBAAoB,EAAE,KAAK;IAC3B,OAAO,EAAE,KAAK;IACd,mBAAmB,EAAE,EAAE;IACvB,cAAc,EAAE,OAAO;IACvB,UAAU,EAAE,KAAK;IACjB,sBAAsB,EAAE,kBAAkB;IAC1C,iBAAiB,EAAE,0BAA0B;IAC7C,YAAY,EAAE,0BAA0B;CACzC,CAAC;AAGO,kCAAW;AADpB,WAAW,CAAC,mBAAmB,GAAG,wBAAwB,CAAC"} \ No newline at end of file diff --git a/package.json b/package.json index 958266bd5..2217dfc96 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Leapp", - "version": "0.3.2", + "version": "0.3.3", "author": { "name": "besharp", "email": "info@besharp.it" @@ -8,24 +8,24 @@ "description": "Straight programmatic access via Single Sign-on to all your AWS accounts and resources.", "contributors": [ { - "name": "Alessandro Gaggia", - "email": "alex@besharp.it" + "name": "Andrea Cavagna", + "email": "andrea.cavagna@noovolari.com" }, { - "name": "Paolo Diciaula", - "email": "paolo.diciaula@besharp.it" + "name": "Paolo Diciaula", + "email": "paolo.diciaula@besharp.it" }, { - "name": "Eric Villa", - "email": "eric@noovolari.com" + "name": "Alessandro Gaggia", + "email": "alex@besharp.it" }, { - "name": "Andrea Cavagna", - "email": "andrea.cavagna@noovolari.com" + "name": "Nicolò Marchesi", + "email": "nicolo@noovolari.com" }, { - "name": "Nicolò Marchesi", - "email": "nicolo@noovolari.com" + "name": "Eric Villa", + "email": "eric@noovolari.com" } ], "repository": "https://github.com/Noovolari/leapp", diff --git a/src/app/services-system/app.service.ts b/src/app/services-system/app.service.ts index 39c77698c..ce5b76865 100644 --- a/src/app/services-system/app.service.ts +++ b/src/app/services-system/app.service.ts @@ -3,7 +3,7 @@ import {NativeService} from './native-service'; import {FileService} from './file.service'; import {ToastrService} from 'ngx-toastr'; import {ConfirmationDialogComponent} from '../shared/confirmation-dialog/confirmation-dialog.component'; -import {BsModalRef, BsModalService} from 'ngx-bootstrap'; +import {BsModalService} from 'ngx-bootstrap'; import {FormControl, FormGroup} from '@angular/forms'; import {environment} from '../../environments/environment'; import {InputDialogComponent} from '../shared/input-dialog/input-dialog.component'; @@ -335,6 +335,7 @@ export class AppService extends NativeService { * @param callback - the callback for the ok button to launch */ inputDialog(title: string, placeholder: string, message: string, callback: any) { + console.log('inputDialog'); for (let i = 1; i <= this.modalService.getModalsCount(); i++) { this.modalService.hide(i); } diff --git a/src/app/services/timer-service.ts b/src/app/services/timer-service.ts index afb390e77..756eecd0c 100644 --- a/src/app/services/timer-service.ts +++ b/src/app/services/timer-service.ts @@ -19,8 +19,7 @@ export class TimerService extends NativeService { if (this.startTime) { const currentTime = new Date(); const seconds = (currentTime.getTime() - this.startTime.getTime()) / 1000; - const bufferZone = 5; - const timeToRefresh = (seconds > (environment.sessionDuration - bufferZone)); + const timeToRefresh = (seconds > environment.sessionDuration); if (timeToRefresh) { this.processRefreshByTimer.emit(); } diff --git a/src/app/strategies/awsStrategy.ts b/src/app/strategies/awsStrategy.ts index ce07d94ad..c14ece2c5 100644 --- a/src/app/strategies/awsStrategy.ts +++ b/src/app/strategies/awsStrategy.ts @@ -206,8 +206,6 @@ export class AwsStrategy extends RefreshCredentialsStrategy { const secretKey = await this.keychainService.getSecret(environment.appName, this.appService.keychainGenerateSecretString(parentSession.account.accountName, (parentSession.account as AwsPlainAccount).user)); const credentials = {default: {aws_access_key_id: accessKey, aws_secret_access_key: secretKey}}; - this.fileService.iniWriteSync(this.appService.awsCredentialPath(), credentials); - this.proxyService.configureBrowserWindow(this.appService.currentBrowserWindow()); const params = { @@ -268,13 +266,7 @@ export class AwsStrategy extends RefreshCredentialsStrategy { }); }; - this.keychainService.getSecret(environment.appName, this.generateTrusterAccountSessionTokenExpirationString(session)).then(sessionTokenData => { - if (sessionTokenData && this.isSessionTokenStillValid(sessionTokenData)) { - this.applyTrusterAccountSessionToken(workspace, session); - } else { - processData(params); - } - }); + processData(params); } } @@ -304,9 +296,9 @@ export class AwsStrategy extends RefreshCredentialsStrategy { const sts = new AWS.STS(this.appService.stsOptions(session)); const params = { DurationSeconds: environment.sessionTokenDuration }; - this.keychainService.getSecret(environment.appName, this.generateTrusterAccountSessionTokenExpirationString(parentSession)).then(sessionTokenExpirationData => { + this.keychainService.getSecret(environment.appName, this.generateTrusterAccountSessionTokenExpirationString(session)).then(sessionTokenExpirationData => { if (sessionTokenExpirationData && this.isSessionTokenStillValid(sessionTokenExpirationData)) { - this.keychainService.getSecret(environment.appName, this.generateTrusterAccountSessionTokenString(parentSession)).then(sessionTokenData => { + this.keychainService.getSecret(environment.appName, this.generateTrusterAccountSessionTokenString(session)).then(sessionTokenData => { sessionTokenData = JSON.parse(sessionTokenData); processData(sessionTokenData, null); });