Skip to content

Commit

Permalink
Merge branch 'stage'
Browse files Browse the repository at this point in the history
  • Loading branch information
0kl-usds committed Dec 6, 2024
2 parents 441fc49 + babe9d7 commit 044a5f7
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/push-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ jobs:
cf_org: gsa-tts-usdc
cf_space: prod
cf_manifest: deployProd.yml
cf_command: push assessment-tool -f deployProd.yml --strategy rolling -i 2
cf_command: push smeq-rr -f deployProd.yml --strategy rolling -i 2
2 changes: 1 addition & 1 deletion api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"start:ts": "npm run build && node --inspect=0.0.0.0:9222 --nolazy build/server.js",
"start:dev": "nodemon --watch 'src/**/*.ts' --exec \"npm run start:ts\"",
"tunnel": "myapp_guid=$(cf app --guid $APP_NAME) && TUNNEL=$(cf curl /v2/apps/$myapp_guid/env | jq -r '[.system_env_json.VCAP_SERVICES.\"aws-rds\"[0].credentials | .host, .port] | join(\":\")') && echo 'Rat tunnel active' &&cf ssh -N -L 5432:$TUNNEL $APP_NAME",
"tunnel:stage": "APP_NAME=smeqa-stage npm run tunnel",
"tunnel:stage": "APP_NAME=smeqa-staging npm run tunnel",
"tunnel:prod": "APP_NAME=smeqa-rr npm run tunnel",
"watch": "tsc -w -p ."
},
Expand Down
4 changes: 2 additions & 2 deletions api/src/auth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ export default async function authSetup() {
try {
const oidcLoa1Strat = await generateStrategy();
passport.use('oidc-loa-1', oidcLoa1Strat);

logger.debug(oidcLoa1Strat);
} catch (err) {
logger.error('Error setting up login.gov' );
logger.error('Error setting up login.gov');
logger.error(JSON.stringify(err));
}
passport.use('token-login', demoStrategy);
Expand Down
8 changes: 5 additions & 3 deletions api/src/auth/loginGov.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ const logoutObject: { issuer: Issuer<Client> | null } = { issuer: null };
async function generateStrategy() {
const userService = new UserService();
const secretKey = openIdConfig.secretKey;
const [key, issuer] = await Promise.all([jose.JWK.asKey(secretKey, 'pem'), Issuer.discover(openIdConfig.issuerDiscover)]);
logger.info(JSON.stringify(openIdConfig))
logger.info(JSON.stringify(jose.JWK.asKey(secretKey, 'pem')));
const issuer = await Issuer.discover(openIdConfig.issuerDiscover)
logger.info(`OpenId Issuer set to ${issuer.issuer}`);
const key = await jose.JWK.asKey(secretKey, 'pem');
logger.info(`Key successfully read`);

logoutObject.issuer = issuer;
logger.info(`OpenId Issuer set to ${issuer.issuer}`);

const clientOptions: ClientMetadata = {
client_id: openIdConfig.clientId,
Expand Down
4 changes: 2 additions & 2 deletions deployStage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ applications:
APP_ENV: staging
OPTIMIZE_MEMORY: true
TZ: America/New_York
AUTH_CALLBACK_ROOT_URL: https://smeqa-stagingsmeqa-.app.cloud.gov
AUTH_CALLBACK_ROOT_URL: https://smeqa-staging.app.cloud.gov
LOG_LEVEL: trace
REDIRECT_URI: https://smeqa-stagingsmeqa-.app.cloud.gov/login/auth
REDIRECT_URI: https://smeqa-staging.app.cloud.gov/login/auth
command: node server.js
type: nodejs
path: ./api/build
Expand Down

0 comments on commit 044a5f7

Please sign in to comment.