Skip to content

Commit

Permalink
fix for desktop login, adds desktop as an access provider
Browse files Browse the repository at this point in the history
  • Loading branch information
jgadsden authored Jul 22, 2023
2 parents 33f3211 + dc49845 commit 0da8a4c
Show file tree
Hide file tree
Showing 30 changed files with 411 additions and 78 deletions.
41 changes: 40 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,55 @@
!td.vue/src/
!td.vue/src/assets/*.jpg
!td.vue/src/assets/*.svg
!td.vue/src/icons/*
!td.vue/src/components/
!td.vue/src/components/
!td.vue/src/components/printed-report/
!td.vue/src/components/report/
!td.vue/src/desktop/
!td.vue/src/i18n/
!td.vue/src/icons/
!td.vue/src/plugins/
!td.vue/src/router/
!td.vue/src/service/
!td.vue/src/service/api/
!td.vue/src/service/demo/
!td.vue/src/service/entity/
!td.vue/src/service/migration/
!td.vue/src/service/provider/
!td.vue/src/service/threats/
!td.vue/src/service/x6/
!td.vue/src/store/
!td.vue/src/store/actions/
!td.vue/src/store/modules/
!td.vue/src/styles/
!td.vue/src/views/
!td.vue/src/views/demo/
!td.vue/src/views/git/
!td.vue/tests/
!td.vue/tests/e2e/
!td.vue/tests/e2e/desktop/
!td.vue/tests/e2e/fixtures/
!td.vue/tests/e2e/specs/
!td.vue/tests/e2e/support/
!td.vue/tests/unit/
!td.vue/tests/unit/components/
!td.vue/tests/unit/components/printed-report/
!td.vue/tests/unit/components/report/
!td.vue/tests/unit/desktop/
!td.vue/tests/unit/entity/
!td.vue/tests/unit/router/
!td.vue/tests/unit/service/
!td.vue/tests/unit/service/api/
!td.vue/tests/unit/service/demo/
!td.vue/tests/unit/service/entity/
!td.vue/tests/unit/service/migration/
!td.vue/tests/unit/service/provider/
!td.vue/tests/unit/service/threats/
!td.vue/tests/unit/service/x6/
!td.vue/tests/unit/store/actions/
!td.vue/tests/unit/store/modules/
!td.vue/tests/unit/views/
!td.vue/tests/unit/views/demo/
!td.vue/package.json
!td.vue/package-lock.json
!td.vue/.browserslistrc
Expand Down
2 changes: 1 addition & 1 deletion td.server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This is a Express project that is the back end server for the OWASP Threat Drago

### Compiles and minifies for production

`npm build`
`npm run build`

Clean the distribution with

Expand Down
5 changes: 3 additions & 2 deletions td.vue/src/components/ProviderLoginButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
></font-awesome-icon>
</span>
<span>
{{ $t('home.loginWith') }} {{ $t('providers.' + provider.key + '.displayName') }}
{{ $t('providers.' + provider.key + '.loginWith') }} {{ $t('providers.' + provider.key + '.displayName') }}
</span>
</b-btn>
</template>
Expand All @@ -37,9 +37,10 @@ export default {
},
methods: {
async onProviderClick() {
console.debug('login with provider: ' + this.provider.key);
await this.$store.dispatch(PROVIDER_SELECTED, this.provider.key);
if (this.provider.key === providerNames.local) {
if (this.provider.key === providerNames.local || this.provider.key === providerNames.desktop) {
this.$store.dispatch(AUTH_SET_LOCAL);
return this.$router.push('/dashboard');
}
Expand Down
13 changes: 9 additions & 4 deletions td.vue/src/i18n/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@ const deu = {
home: {
title: 'OWASP Threat Dragon',
imgAlt: 'Threat Dragon Logo',
description: 'OWASP Threat Dragon is a free, open-source, cross-platform application for creating threat models. Use it to draw threat modeling diagrams and to identify threats for your system. With an emphasis on flexibility and simplicity it is easily accessible for all types of users.',
loginWith: 'Login with'
description: 'OWASP Threat Dragon is a free, open-source, cross-platform application for creating threat models. Use it to draw threat modeling diagrams and to identify threats for your system. With an emphasis on flexibility and simplicity it is easily accessible for all types of users.'
},
providers: {
desktop: {
displayName: 'Threat Dragon',
loginWith: 'Start'
},
github: {
displayName: 'GitHub'
displayName: 'GitHub',
loginWith: 'Login with'
},
local: {
displayName: 'Local Session'
displayName: 'Local Session',
loginWith: 'Login to'
}
},
dashboard: {
Expand Down
13 changes: 9 additions & 4 deletions td.vue/src/i18n/el.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@ const ell = {
home: {
title: 'OWASP Threat Dragon',
imgAlt: 'Threat Dragon Logo',
description: 'Το Threat Dragon είναι ένα δωρεάν, ανοιχτού κώδικα εργαλείο μοντελοποίησης απειλών (threat modeling) του Οργανισμού OWASP. Μπορεί να χρησιμοποιηθεί ως μια αυτόνομη desktop εφαρμογή για Windows, MacOS και Linux ή ως μια web εφαρμογή. Η desktop εφαρμογή είναι ιδανική αν θέλετε να δοκιμάσετε την εφαρμογή χωρίς να της δώσετε πρόσβαση στα github αποθετήρια σας, αλλά αν επιλέξετε την online έκδοση τότε θα "εξαπολύσετε" την φοβερή δύναμη του GitHub στα μοντέλα απειλών σας! Προφανώς, για να το κάνετε αυτό θα πρέπει πρώτα να συνδεθείτε.',
loginWith: 'Είσοδος με'
description: 'Το Threat Dragon είναι ένα δωρεάν, ανοιχτού κώδικα εργαλείο μοντελοποίησης απειλών (threat modeling) του Οργανισμού OWASP. Μπορεί να χρησιμοποιηθεί ως μια αυτόνομη desktop εφαρμογή για Windows, MacOS και Linux ή ως μια web εφαρμογή. Η desktop εφαρμογή είναι ιδανική αν θέλετε να δοκιμάσετε την εφαρμογή χωρίς να της δώσετε πρόσβαση στα github αποθετήρια σας, αλλά αν επιλέξετε την online έκδοση τότε θα "εξαπολύσετε" την φοβερή δύναμη του GitHub στα μοντέλα απειλών σας! Προφανώς, για να το κάνετε αυτό θα πρέπει πρώτα να συνδεθείτε.'
},
providers: {
desktop: {
displayName: 'Threat Dragon',
loginWith: 'Start'
},
github: {
displayName: 'GitHub'
displayName: 'GitHub',
loginWith: 'Είσοδος με'
},
local: {
displayName: 'Τοπική Συνεδρία'
displayName: 'Τοπική Συνεδρία',
loginWith: 'Είσοδος με'
}
},
dashboard: {
Expand Down
13 changes: 9 additions & 4 deletions td.vue/src/i18n/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@ const eng = {
home: {
title: 'OWASP Threat Dragon',
imgAlt: 'Threat Dragon Logo',
description: 'OWASP Threat Dragon is a free, open-source, cross-platform application for creating threat models. Use it to draw threat modeling diagrams and to identify threats for your system. With an emphasis on flexibility and simplicity it is easily accessible for all types of users.',
loginWith: 'Login with'
description: 'OWASP Threat Dragon is a free, open-source, cross-platform application for creating threat models. Use it to draw threat modeling diagrams and to identify threats for your system. With an emphasis on flexibility and simplicity it is easily accessible for all types of users.'
},
providers: {
desktop: {
displayName: 'Threat Dragon',
loginWith: 'Start'
},
github: {
displayName: 'GitHub'
displayName: 'GitHub',
loginWith: 'Login with'
},
local: {
displayName: 'Local Session'
displayName: 'Local Session',
loginWith: 'Login to'
}
},
dashboard: {
Expand Down
13 changes: 9 additions & 4 deletions td.vue/src/i18n/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@ const spa = {
home: {
title: 'OWASP Threat Dragon',
imgAlt: 'Logo de Threat Dragon',
description: 'Threat Dragon es una herramienta de modelado de amenazas de código abierto de OWASP. Se puede utilizar como aplicación desktop para Windows, MacOS y Linux o como una aplicación web. La aplicación de desktop es excelente si desea probarla sin otorgar acceso a sus repositorios de GitHub. Sin embargo, si elige la versión web, podrá liberar el increíble poder de GitHub en sus modelos de amenazas (threat models). Por supuesto, para hacer esto, deberá iniciar sesión en GitHub y permitir el acceso al repositorio de interés',
loginWith: 'Conectarse con'
description: 'Threat Dragon es una herramienta de modelado de amenazas de código abierto de OWASP. Se puede utilizar como aplicación desktop para Windows, MacOS y Linux o como una aplicación web. La aplicación de desktop es excelente si desea probarla sin otorgar acceso a sus repositorios de GitHub. Sin embargo, si elige la versión web, podrá liberar el increíble poder de GitHub en sus modelos de amenazas (threat models). Por supuesto, para hacer esto, deberá iniciar sesión en GitHub y permitir el acceso al repositorio de interés'
},
providers: {
desktop: {
displayName: 'Threat Dragon',
loginWith: 'Start'
},
github: {
displayName: 'GitHub'
displayName: 'GitHub',
loginWith: 'Conectarse con'
},
local: {
displayName: 'Sesión Local'
displayName: 'Sesión Local',
loginWith: 'Conectarse con'
}
},
dashboard: {
Expand Down
13 changes: 9 additions & 4 deletions td.vue/src/i18n/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@ const fra = {
home: {
title: 'OWASP Threat Dragon',
imgAlt: 'Logo Threat Dragon',
description: 'Threat Dragon est un outil de modélisation des menaces open-source et gratuit d\'OWASP. Il peut être utilisé comme une application de bureau sur Windows, MacOS et Linux, ou comme une application Web. L\'application de bureau est idéale si vous voulez essayer Threat Dragon sans lui donner accès à vos projets GitHub, mais si vous choisissez la version en ligne, vous pouvez profiter de la puissance impressionnante de GitHub sur vos modèles de menace! Pour ce faire, vous devez d\'abord vous connecter.',
loginWith: 'Se connecter avec'
description: 'Threat Dragon est un outil de modélisation des menaces open-source et gratuit d\'OWASP. Il peut être utilisé comme une application de bureau sur Windows, MacOS et Linux, ou comme une application Web. L\'application de bureau est idéale si vous voulez essayer Threat Dragon sans lui donner accès à vos projets GitHub, mais si vous choisissez la version en ligne, vous pouvez profiter de la puissance impressionnante de GitHub sur vos modèles de menace! Pour ce faire, vous devez d\'abord vous connecter.'
},
providers: {
desktop: {
displayName: 'Threat Dragon',
loginWith: 'Start'
},
github: {
displayName: 'GitHub'
displayName: 'GitHub',
loginWith: 'Se connecter avec'
},
local: {
displayName: 'une session locale'
displayName: 'une session locale',
loginWith: 'Se connecter avec'
}
},
dashboard: {
Expand Down
13 changes: 9 additions & 4 deletions td.vue/src/i18n/hi.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@ const hin = {
home: {
title: 'OWASP थ्रेट ड्रैगन',
imgAlt: 'थ्रेट ड्रैगन प्रतीक चिन्ह',
description: 'थ्रेट ड्रैगन OWASP का एक फ्री, ओपन-सोर्स थ्रेट मॉडलिंग टूल है। इसका उपयोग विंडोज, मैकओएस और लिनक्स के लिए एक स्टैंडअलोन डेस्कटॉप ऐप या वेब एप्लिकेशन के रूप में किया जा सकता है। डेस्कटॉप ऐप बहुत अच्छा है यदि आप एप्लिकेशन को अपने GitHub रेपो तक पहुंच दिए बिना इसे आज़माना चाहते हैं, लेकिन यदि आप ऑनलाइन संस्करण चुनते हैं तो आप अपने खतरे के मॉडल पर GitHub की भयानक शक्ति प्राप्त कर सकते हैं! जाहिर है, ऐसा करने के लिए आपको पहले लॉग इन करना होगा।',
loginWith: 'से लोगिन करें'
description: 'थ्रेट ड्रैगन OWASP का एक फ्री, ओपन-सोर्स थ्रेट मॉडलिंग टूल है। इसका उपयोग विंडोज, मैकओएस और लिनक्स के लिए एक स्टैंडअलोन डेस्कटॉप ऐप या वेब एप्लिकेशन के रूप में किया जा सकता है। डेस्कटॉप ऐप बहुत अच्छा है यदि आप एप्लिकेशन को अपने GitHub रेपो तक पहुंच दिए बिना इसे आज़माना चाहते हैं, लेकिन यदि आप ऑनलाइन संस्करण चुनते हैं तो आप अपने खतरे के मॉडल पर GitHub की भयानक शक्ति प्राप्त कर सकते हैं! जाहिर है, ऐसा करने के लिए आपको पहले लॉग इन करना होगा।'
},
providers: {
desktop: {
displayName: 'Threat Dragon',
loginWith: 'Start'
},
github: {
displayName: 'GitHub'
displayName: 'GitHub',
loginWith: 'से लोगिन करें'
},
local: {
displayName: 'स्थानीय सत्र'
displayName: 'स्थानीय सत्र',
loginWith: 'से लोगिन करें'
}
},
dashboard: {
Expand Down
13 changes: 9 additions & 4 deletions td.vue/src/i18n/pt.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@ const por = {
home: {
title: 'OWASP Threat Dragon',
imgAlt: 'Logo do Threat Dragon',
description: 'Threat Dragon é uma ferramenta gratuita e open-souce de modelagem de ameaças da OWASP e que pode ser utilizada via desktop para Windows, MacOS e Linux ou como uma aplicação web. A aplicação de desktop é excelente se você quiser experimentá-la sem conceder acesso aos seus repositórios do GitHub. No entanto, se você escolher a versão web, poderá liberar o incrível poder do GitHub em seus modelos de ameaça (threat model)! Obviamente, para fazer isso, será necessário realizar o login no GitHub e permitir o acesso ao repositório de interesse!',
loginWith: 'Login com'
description: 'Threat Dragon é uma ferramenta gratuita e open-souce de modelagem de ameaças da OWASP e que pode ser utilizada via desktop para Windows, MacOS e Linux ou como uma aplicação web. A aplicação de desktop é excelente se você quiser experimentá-la sem conceder acesso aos seus repositórios do GitHub. No entanto, se você escolher a versão web, poderá liberar o incrível poder do GitHub em seus modelos de ameaça (threat model)! Obviamente, para fazer isso, será necessário realizar o login no GitHub e permitir o acesso ao repositório de interesse!'
},
providers: {
desktop: {
displayName: 'Threat Dragon',
loginWith: 'Start'
},
github: {
displayName: 'GitHub'
displayName: 'GitHub',
loginWith: 'Login com'
},
local: {
displayName: 'Sessão Local'
displayName: 'Sessão Local',
loginWith: 'Login com'
}
},
dashboard: {
Expand Down
13 changes: 9 additions & 4 deletions td.vue/src/i18n/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@ const rus = {
home: {
title: 'OWASP Threat Dragon',
imgAlt: 'Threat Dragon Logo',
description: 'OWASP Threat Dragon is a free, open-source, cross-platform application for creating threat models. Use it to draw threat modeling diagrams and to identify threats for your system. With an emphasis on flexibility and simplicity it is easily accessible for all types of users.',
loginWith: 'Login with'
description: 'OWASP Threat Dragon is a free, open-source, cross-platform application for creating threat models. Use it to draw threat modeling diagrams and to identify threats for your system. With an emphasis on flexibility and simplicity it is easily accessible for all types of users.'
},
providers: {
desktop: {
displayName: 'Threat Dragon',
loginWith: 'Start'
},
github: {
displayName: 'GitHub'
displayName: 'GitHub',
loginWith: 'Login with'
},
local: {
displayName: 'Local Session'
displayName: 'Local Session',
loginWith: 'Login to'
}
},
dashboard: {
Expand Down
13 changes: 9 additions & 4 deletions td.vue/src/i18n/uk.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@ const ukr = {
home: {
title: 'OWASP Threat Dragon',
imgAlt: 'Threat Dragon Logo',
description: 'OWASP Threat Dragon is a free, open-source, cross-platform application for creating threat models. Use it to draw threat modeling diagrams and to identify threats for your system. With an emphasis on flexibility and simplicity it is easily accessible for all types of users.',
loginWith: 'Login with'
description: 'OWASP Threat Dragon is a free, open-source, cross-platform application for creating threat models. Use it to draw threat modeling diagrams and to identify threats for your system. With an emphasis on flexibility and simplicity it is easily accessible for all types of users.'
},
providers: {
desktop: {
displayName: 'Threat Dragon',
loginWith: 'Start'
},
github: {
displayName: 'GitHub'
displayName: 'GitHub',
loginWith: 'Login with'
},
local: {
displayName: 'Local Session'
displayName: 'Local Session',
loginWith: 'Login to'
}
},
dashboard: {
Expand Down
13 changes: 9 additions & 4 deletions td.vue/src/i18n/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@ const zho = {
home: {
title: 'OWASP Threat Dragon',
imgAlt: 'Threat Dragon Logo',
description: 'Threat Dragon 是来自 OWASP 的免费开源威胁建模工具。它可以用作 Windows、MacOS 和 Linux 的独立桌面应用程序,也可以用作 Web 应用程序。如果您想在不授予其 GitHub 存储库访问权限的情况下试用该应用程序,则桌面应用程序非常棒,但如果您选择在线(Web)版本,则可以在威胁模型上释放 GitHub 的强大功能!根据需求选择下方登录方式。',
loginWith: '登录'
description: 'Threat Dragon 是来自 OWASP 的免费开源威胁建模工具。它可以用作 Windows、MacOS 和 Linux 的独立桌面应用程序,也可以用作 Web 应用程序。如果您想在不授予其 GitHub 存储库访问权限的情况下试用该应用程序,则桌面应用程序非常棒,但如果您选择在线(Web)版本,则可以在威胁模型上释放 GitHub 的强大功能!根据需求选择下方登录方式。'
},
providers: {
desktop: {
displayName: 'Threat Dragon',
loginWith: 'Start'
},
github: {
displayName: 'GitHub'
displayName: 'GitHub',
loginWith: '登录'
},
local: {
displayName: '本地'
displayName: '本地',
loginWith: '登录'
}
},
dashboard: {
Expand Down
Loading

0 comments on commit 0da8a4c

Please sign in to comment.