Skip to content

Commit

Permalink
fix some more errors, add tf env var for API JWT key
Browse files Browse the repository at this point in the history
  • Loading branch information
doug-s-nava committed Jan 8, 2025
1 parent f0a44b7 commit 5fd25dd
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ USE_SEARCH_MOCK_DATA=false
NEW_RELIC_APP_NAME=
NEW_RELIC_LICENSE_KEY=

SESSION_SECRET=extraSecretSessionSecretValueSssh
# SESSION_SECRET=extraSecretSessionSecretValueSssh
2 changes: 1 addition & 1 deletion frontend/src/components/user/UserControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const LoginLink = ({
loginUrl: string;
}) => {
return (
<div className="usa-nav__primary-item border-0">
<div className="usa-nav__primary-item border-0 desktop:margin-top-0 margin-top-1">
<a
{...(loginUrl ? { href: loginUrl } : "")}
key="login-link"
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/services/auth/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ let loginGovJwtKey: KeyObject;

// isolate encoding behavior from file execution
const initializeSessionSecrets = () => {
if (!environment.SESSION_SECRET || !environment.API_JWT_PUBLIC_KEY) {
// eslint-disable-next-line
console.debug("Session keys not present");
return;
}
// eslint-disable-next-line
console.debug("Initializing Session Secrets");
clientJwtKey = encodeText(environment.SESSION_SECRET);
Expand Down
4 changes: 4 additions & 0 deletions infra/frontend/app-config/env-config/environment-variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,9 @@ locals {
manage_method = "manual"
secret_store_name = "/${var.app_name}/${var.environment}/feature-auth-on"
},
API_JWT_PUBLIC_KEY = {
manage_method = "manual"
secret_store_name = "/api/${var.environment}/api-jwt-public-key"
},
}
}

0 comments on commit 5fd25dd

Please sign in to comment.