Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ECS component index templates #108

Merged
merged 26 commits into from
Jan 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2a621f2
feat: ECS component index templates
mbystedt Jan 13, 2022
d22b3e4
fix: deploy metrics
mbystedt Jan 13, 2022
659303f
fix: replace ES types not support in OS
mbystedt Jan 18, 2022
bc428ae
fix: Disable FileAttributeParser as it creates non-compliant fields
mbystedt Jan 18, 2022
a3cfab7
fix: remove log attributes
mbystedt Jan 18, 2022
dea7935
fix: add package-lock.json
mbystedt Jan 18, 2022
8381633
fix: move var default to terragrunt
mbystedt Jan 18, 2022
933ebfa
fix: Add providers
mbystedt Jan 18, 2022
87248d4
fix: move decode
mbystedt Jan 18, 2022
c50a366
fix: toset
mbystedt Jan 18, 2022
faf7228
fix: tuple to map
mbystedt Jan 18, 2022
539314d
fix: try square?
mbystedt Jan 18, 2022
2a982f6
fix: depends_on to module block
mbystedt Jan 18, 2022
04df3b3
fix: tenant_permissions.
mbystedt Jan 18, 2022
a132705
fix: tenant_permissions.
mbystedt Jan 18, 2022
aa20251
fix: debug
mbystedt Jan 19, 2022
7a4e2ac
fix: copy files
mbystedt Jan 19, 2022
39e8ac2
fix: add URL
mbystedt Jan 19, 2022
c6cf6d3
fix: region
mbystedt Jan 19, 2022
d50d043
fix: remove temp
mbystedt Jan 19, 2022
c2389c8
fix: Add wrapped_accessor keyword
mbystedt Jan 19, 2022
f314ef1
fix: properties and show status code
mbystedt Jan 19, 2022
9752787
fix: names & logging of errors
mbystedt Jan 19, 2022
a40da4c
feat: add metrics template and cdogs fingerprint
mbystedt Jan 20, 2022
b9fbbbf
fix: metrics types and missing role
mbystedt Jan 20, 2022
e4f4359
feat: More index templates and proposed management policies
mbystedt Jan 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions .github/workflows/deploy_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@ jobs:
with:
node-version: 14.x
- run: npm ci
working-directory: ./event-stream-processing
working-directory: ./workflow-cli
- run: cp -R workflow-cli terraform/workflow-cli
working-directory: ./
- name: Download/Install Maxmind databases
run: npm run ts-node ./src/operations/download-maxmind-geoip-databases.ts
working-directory: ./event-stream-processing
run: ./bin/dev lambda-asset-download
working-directory: ./workflow-cli
env:
MAXMIND_LICENSE_KEY: ${{secrets.MAXMIND_LICENSE_KEY}}
- run: npm ci
working-directory: ./event-stream-processing
- run: mkdir dist
working-directory: ./event-stream-processing
- run: npm run pack
Expand All @@ -60,3 +64,13 @@ jobs:
env:
app_image: ${{ env.IMAGE_ID }}:${{ github.event.workflow_run.head_branch}}
run: terragrunt apply-all --terragrunt-non-interactive
- name: Keycloak sync
run: ./bin/dev keycloak-sync
working-directory: ./workflow-cli
env:
KEYCLOAK_ADMIN_CLIENT_ID: ${{secrets.KEYCLOAK_ADMIN_CLIENT_ID}}
KEYCLOAK_ADMIN_CLIENT_SECRET: ${{secrets.KEYCLOAK_ADMIN_CLIENT_SECRET}}
KEYCLOAK_REALM: ${{secrets.KEYCLOAK_REALM}}
KEYCLOAK_TARGET_CLIENT_ID: https://apm.io.nrs.gov.bc.ca
KEYCLOAK_TARGET_CLIENT_URL: https://apm.io.nrs.gov.bc.ca
KEYCLOAK_URL: https://oidc.gov.bc.ca
62 changes: 0 additions & 62 deletions .github/workflows/deploy_test.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/destroy_test.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"eslint.workingDirectories": [
"event-stream-processing"
"event-stream-processing",
"workflow-cli"
],
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false,
"[javascript]": {
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The product in deployed using Github actions. A Terraform cloud team server hand
Notes:

* Terraform is limited in the objects it can manage by the AWS Landing Zone permissions.
* AWS Secrets Manager holds the keycloak secrets in a secret named `<env>/nrdk/config/keycloak`.
* Github holds the keycloak secrets.
* The folder `terragrunt/<env>` holds most of the environment specific configuration.

## Local Setup
Expand Down
1 change: 0 additions & 1 deletion event-stream-processing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"test": "jest",
"deploy": "ts-node src/operations/deploy.ts",
"ts-node": "ts-node",
"typedoc": "typedoc"
},
Expand Down
27 changes: 21 additions & 6 deletions event-stream-processing/src/constants/fingerprints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export const FINGERPRINTS: OsDocumentFingerprint[] = [
apacheAccessLog: true,
appClassification: true,
deslash: true,
fileAttributes: true,
explodeHttpUrl: true,
geoIp: true,
httpStatusOutcome: true,
Expand All @@ -31,6 +30,26 @@ export const FINGERPRINTS: OsDocumentFingerprint[] = [
},
},
},
{
name: FingerprintCategory.APACHE_ACCESS_LOGS,
fingerprint: {
event: {
kind: 'event',
category: 'web',
dataset: 'express.access',
},
},
dataDefaults: {
'@metadata': {
hash: '@timestamp,host.hostname,event.squence,event.original',
docId: 'labels.project,service.name,event.squence,event.hash',
index: 'nrm-logs-access-<%=YYYY.MM.DD=%>',
geoIp: true,
httpStatusOutcome: true,
userAgent: true,
},
},
},
{
name: FingerprintCategory.APACHE_ACCESS_LOGS,
fingerprint: {
Expand All @@ -47,9 +66,8 @@ export const FINGERPRINTS: OsDocumentFingerprint[] = [
index: 'nrm-logs-access-<%=YYYY.MM.DD=%>',
timestampField: 'timestamp',
timestampFormat: 'DD/MMM/YYYY:HH:mm:ss Z',
// Remove?
// timestampFormat: 'YYYY-MM-DDTHH:mm:ss.SSSZ',
deslash: true,
fileAttributes: true,
explodeHttpUrl: true,
geoIp: true,
httpStatusOutcome: true,
Expand Down Expand Up @@ -98,7 +116,6 @@ export const FINGERPRINTS: OsDocumentFingerprint[] = [
// Remove?
appClassification: true,
deslash: true,
fileAttributes: true,
explodeHttpUrl: true,
geoIp: true,
httpStatusOutcome: true,
Expand Down Expand Up @@ -127,7 +144,6 @@ export const FINGERPRINTS: OsDocumentFingerprint[] = [
// Remove?
appClassification: true,
deslash: true,
fileAttributes: true,
explodeHttpUrl: true,
geoIp: true,
httpStatusOutcome: true,
Expand Down Expand Up @@ -156,7 +172,6 @@ export const FINGERPRINTS: OsDocumentFingerprint[] = [
// Remove?
appClassification: true,
deslash: true,
fileAttributes: true,
explodeHttpUrl: true,
geoIp: true,
httpStatusOutcome: true,
Expand Down
3 changes: 0 additions & 3 deletions event-stream-processing/src/operations/README.md

This file was deleted.

43 changes: 0 additions & 43 deletions event-stream-processing/src/operations/deploy.ts

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {Parser} from '../types/parser';
@injectable()
/**
* Parse attributes from fields
* @deprecated
*
* Tag: support
*/
Expand Down
11 changes: 0 additions & 11 deletions terraform/_pipeline/deploy-snippets.local.txt

This file was deleted.

Loading