Skip to content

Commit

Permalink
Merge pull request #16453 from CDCgov/deployment/2024-11-05
Browse files Browse the repository at this point in the history
Deployment of 2024-11-05
  • Loading branch information
jack-h-wang authored Nov 5, 2024
2 parents e8c0589 + 32b36f0 commit f15e55a
Show file tree
Hide file tree
Showing 73 changed files with 2,225 additions and 3,076 deletions.
67 changes: 29 additions & 38 deletions .environment/gitleaks/gitleaks-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,36 @@ title = "PRIME ReportStream Gitleaks Configuration"
# Global allowlist
[allowlist]
description = "Allow-list for files and paths"
files = [
'(.*?)(bin|doc|gif|iml|jar|jp(e)?g|pdf|png|xlsx)$',
'^\.?gitleaks-config.toml$',
'^\.?gitleaks.report.json$',
'^package-lock\.json$',
'cleanslate.sh.log',
'yarn\.lock$',
]
paths = [
'.environment/sftp-conf',
'.environment/soap_service/',
'.github/scripts/stale_items_report/',
'.idea/',
'.terraform/providers/',
'frontend/dist',
'frontend/node_modules/',
'frontend/src/assets',
'frontend-react/build/',
'frontend-react/node_modules/',
'frontend-react/src/components/ReportStreamHeader.tsx',
'prime-router/.gradle/',
'prime-router/.vault/env/',
'prime-router/build/',
'prime-router/build.gradle.kts',
'prime-router/docs/dependency-graph-full/dependency-graph-full.txt',
'prime-router/docs/schema_documentation/',
'prime-router/docs/design/design/auth/auth-design.md',
'prime-router/docs/getting_started.md',
'prime-router/frontend/src/assets/fonts',
'prime-router/frontend/src/assets/img',
'prime-router/frontend/src/assets/pdf',
'prime-router/frontend/src/assets/webfonts',
'prime-router/src/main/kotlin/cli/tests/TestKeys.kt',
'prime-router/src/test/csv_test_files/input/',
'prime-router/src/test/kotlin/credentials/CredentialTests',
'prime-router/src/test/',
'prime-router/src/main/resources/metadata',
'.environment/gitleaks/gitleaks-config.toml',
'exp/as2/keystore_steps.md',
# package manager files
'package-lock\.json$',
'yarn\.lock$',
# ide
'\.idea\/',
# misc
'(.*?)(bin|doc|gif|iml|jar|jp(e)?g|pdf|png|xlsx)$',
# devops
'\.terraform\/providers\/',
'^\.environment\/gitleaks\/gitleaks-config\.toml$',
'^\.environment\/sftp-conf\/',
'^\.environment\/soap_service\/',
'^\.github\/scripts\/stale_items_report\/',
# backend
'^prime-router\/\.gradle\/',
'^prime-router\/.vault\/env\/',
'^prime-router\/build\/',
'^prime-router\/build\.gradle\.kts',
'^prime-router\/docs\/dependency-graph-full/dependency-graph-full\.txt',
'^prime-router\/docs\/schema_documentation/',
'^prime-router\/docs\/design/design/auth/auth-design\.md',
'^prime-router\/docs\/getting_started\.md',
'^prime-router\/src\/main\/kotlin\/cli\/tests\/TestKeys\.kt',
'^prime-router\/src\/test\/csv_test_files\/input\/',
'^prime-router\/src\/test\/kotlin\/credentials\/CredentialTests',
'^prime-router\/src\/test\/',
'^prime-router\/src\/main\/resources\/metadata',
# frontend
'^frontend-react\/public\/assets\/',
]

[[rules]]
Expand Down
3 changes: 2 additions & 1 deletion .environment/gitleaks/run-gitleaks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ esac
if [[ ${RC?} != 0 ]]; then
error "(return code=${RC?}) Your code may contain secrets, consult the output above and/or one of the following files for more details:"
error " - ${REPO_ROOT?}/${REPORT_JSON?}"
error " - ${REPO_ROOT?}/${LOGFILE?}"
# no log file currently, check the output of whatever ran this
# error " - ${REPO_ROOT?}/${LOGFILE?}"
fi

exit ${RC?}
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/platform-epic-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Platform Epic
about: Platform team's Epic template
title: Platform Epic Title
labels: platform
assignees: ''

---

## Outcome/Objective

## Description

## Product Requirement(s)

## Use Case(s)

## Dependencies

## Acceptance criteria

## Technical Requirement(s)
<!---
- Architecture: What existing patterns and frameworks will be used for this work? What new ones will be added? What additional libraries need to be used?
- Data model: What changes are there to the data model, and how will those changes be implemented (i.e. requires migration)?
- APIs: What existing services are involved? What new ones will be added?
- Technical Constraint(s)
- Integrations: What integrations are involved?
-->
149 changes: 0 additions & 149 deletions frontend-react/.eslintrc.cjs

This file was deleted.

13 changes: 13 additions & 0 deletions frontend-react/docs/okta.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Okta-side configuration

Our frontend is configured to identify as the "Web" application.

## Dev-side configuration

Our use of okta in frontend is configured by the following environment variables whose values can be found in the application listing within Okta:
-VITE_OKTA_CLIENTID
-VITE_OKTA_URL

These variables can be assigned locally for local development (.env.*.local) or by github actions (using values in secrets storage either in github itself or azure).

We use Okta's [Embedded Sign-In Widget for React](https://developer.okta.com/docs/guides/sign-in-to-spa-embedded-widget/react/main/), which includes other Okta-related libraries for react, to handle okta workflows.
6 changes: 3 additions & 3 deletions frontend-react/e2e/spec/all/BasePage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export interface MockPageFixtures {
}

class MockPage extends BasePage {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
data?: any;

constructor(testArgs: BasePageTestArgs) {
Expand All @@ -20,6 +21,7 @@ class MockPage extends BasePage {
[
"fake",
async (res) => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
this.data = await res.json();
},
],
Expand All @@ -30,9 +32,7 @@ class MockPage extends BasePage {
if (this.isMocked) {
this.addMockRouteHandlers([["/fake", { json: { foo: "bar" } }]]);
} else {
const [url, handler] = this.createRouteHandlers([
["/fake", { json: { bar: "foo" } }],
])[0];
const [url, handler] = this.createRouteHandlers([["/fake", { json: { bar: "foo" } }]])[0];
this.routeHandlers.set(url, handler);
}

Expand Down
29 changes: 6 additions & 23 deletions frontend-react/e2e/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,15 @@ const isCI = Boolean(process.env.CI);
const frontendWarningsPath = join(e2eDataPath, "frontend-warnings.json");
const isMockDisabled = Boolean(process.env.MOCK_DISABLED);

function createLogins<const T extends string[]>(
loginTypes: T,
): {
[K in T extends readonly (infer U)[] ? U : never]: {
username: string;
password: string;
totpCode: string;
path: string;
};
} {
function createLogins<const T extends string[]>(loginTypes: T): Record<string, TestLogin> {
const logins = Object.fromEntries(
loginTypes.map((type) => {
const username = process.env[`TEST_${type.toUpperCase()}_USERNAME`];
const password = process.env[`TEST_${type.toUpperCase()}_PASSWORD`];
const totpCode =
process.env[`TEST_${type.toUpperCase()}_TOTP_CODE`];
const totpCode = process.env[`TEST_${type.toUpperCase()}_TOTP_CODE`];

if (!username)
throw new TypeError(`Missing username for login type: ${type}`);
if (!password)
throw new TypeError(`Missing password for login type: ${type}`);
if (!username) throw new TypeError(`Missing username for login type: ${type}`);
if (!password) throw new TypeError(`Missing password for login type: ${type}`);

return [
type,
Expand All @@ -70,7 +58,7 @@ function createLogins<const T extends string[]>(
];
}),
);
return logins as any;
return logins as Record<string, TestLogin>;
}

export const logins = createLogins(["admin", "receiver", "sender"]);
Expand All @@ -94,9 +82,4 @@ export const test = base.extend<CustomFixtures>({
isFrontendWarningsLog: isCI,
});

export type TestArgs<P extends keyof PlaywrightAllTestArgs> = Pick<
PlaywrightAllTestArgs,
P
> &
CustomFixtures;

export type TestArgs<P extends keyof PlaywrightAllTestArgs> = Pick<PlaywrightAllTestArgs, P> & CustomFixtures;
Loading

0 comments on commit f15e55a

Please sign in to comment.