-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Switch to asymmetric signing * Adjust configs * Fix tests * Make secret combination of private and public key in feathers * Add tests * Update typ of JWT * Update authConfig in tests * Handle new lines in keys * Clean up strategy tests * Use JwtModuleOptionsFactory * Use factory method instead of class * Remove authConfig * Remove unnecessary props in AuthGuardConfig * Add AuthGuardConfig to files-storage * Change setting of options in authn service * Add authn test modules * Fix authn service test * Change iss and aud of JWT * Fix reading of config for other apps * Add JWT_SIGNING_ALGORITHM as env var * Add check of algorithm in JWT validation * Add check of issuer and audience in JWT validation * Remove unnecessary consts * Skip broken test * Add SC_Domain to preview-generator-configmap * Add values to top-level configs where forgotten * Add factory for strategy options to satisfy SonarCloud * Use getOrThrow to read values from ConfigService * Define defaultMikroOrmOptions in for AdminApiServerModule separately to fix dependency problem * Add JWT_PUBLIC_KEY to configmap of admin-api-server * Add JWT_PUBLIC_KEY to configmap of preview-generator --------- Co-authored-by: Max Bischof <[email protected]>
- Loading branch information
1 parent
b290804
commit 2016509
Showing
34 changed files
with
307 additions
and
492 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
import { Algorithm } from 'jsonwebtoken'; | ||
|
||
export interface AuthGuardConfig { | ||
ADMIN_API__ALLOWED_API_KEYS: string[]; | ||
JWT_AUD: string; | ||
JWT_LIFETIME: string; | ||
AUTHENTICATION: string; | ||
JWT_PUBLIC_KEY: string; | ||
JWT_SIGNING_ALGORITHM: Algorithm; | ||
SC_DOMAIN: string; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
export * from './auth-config'; | ||
export * from './x-api-key.config'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
247 changes: 0 additions & 247 deletions
247
apps/server/src/infra/auth-guard/mapper/authConfig.factory.spec.ts
This file was deleted.
Oops, something went wrong.
76 changes: 0 additions & 76 deletions
76
apps/server/src/infra/auth-guard/mapper/authConfig.factory.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export * from './authConfig.factory'; | ||
export * from './current-user.factory'; | ||
export * from './jwt.factory'; | ||
export * from './jwt-strategy-options.factory'; |
Oops, something went wrong.