-
Notifications
You must be signed in to change notification settings - Fork 0
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
update helpdesk logic to use Jira personal access tokens #712
Conversation
47081a5
to
7c7396e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
des comments for great good 💰
JIRA_ADMIN_VAULT_CREDENTIALS_PATH= | ||
JIRA_REST_URI= | ||
JIRA_SERVICEDESK_ID= 9 | ||
JIRA_PERSONAL_ACCESS_TOKEN= # PAT is used only when USE_VAULT is false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this replaces the email/pass combo. basic auth will be disabled by resIT for that API soon, and new tokens can be created using the credentials found in the argo prod vault.
@@ -14,7 +14,7 @@ module.exports = { | |||
parserOptions: { | |||
ecmaVersion: 'latest', | |||
extraFileExtensions: ['.json'], | |||
project: ['./tsconfig.json'], | |||
project: ['./tsconfig.json', './tsconfig.eslint.json'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this adds linting for the eslint and prettier config files themselves
@@ -47,10 +47,10 @@ module.exports = { | |||
'prettier/prettier': [ | |||
'error', | |||
{ | |||
printWidth: 100, | |||
trailingComma: 'all', | |||
printWidth: 120, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updates width. update for eslint to import prettier configs to be done in separate PR.
i.e. new api with breaking changes
.env | ||
# only .env will actually be loaded | ||
*.env* | ||
!**/.env.schema |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this allows for local backup files, etc.
"patchTS": "ts-patch install -s", | ||
"prepare": "npm run patchTS", | ||
"programDashboardEsInit": "ts-node --project tsconfig.script.json ./compose/programDashboardEsInit.ts", | ||
"dev": "NODE_PATH=./src NODE_ENV=development nodemon -e js,json,ts ./src/index.ts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one is the real change here, adding nodemon.
lines bellow are just sorting
src/services/reCaptcha/index.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does anyone else hear an echo?
@@ -49,9 +50,11 @@ export const createVaultClient = memoize(async (vaultOptions: VaultOptions = {}) | |||
|
|||
export const loadVaultSecret = | |||
(vaultClient: ReturnType<typeof createVaultClient> = createVaultClient()) => | |||
async (path: string) => { | |||
async <T = Record<string, string>>(path: string): Promise<T> => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
started something, didn't really finish it cognisant of scope, but should enable vault secret validation in the future
@@ -14,7 +14,8 @@ | |||
"outDir": "./dist", | |||
"baseUrl": "./", | |||
"paths": { | |||
"*": ["./src/*"] | |||
"*": ["./src/*"], | |||
"@/*": ["./src/*"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gradual community practices adoption
"allowJs": true | ||
}, | ||
"exclude": ["dist/**/*", "src/**/*"], | ||
"include": [".eslintrc.js", "prettier.config.js", "**/*.json"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validates eslint, prettier, and eventually arranger configs
src/utils/logger.ts
Outdated
), | ||
transports: [ | ||
new transports.Console({ | ||
handleExceptions: true, | ||
level: isProd ? 'error' : 'debug', | ||
level: DEBUG || !IS_PROD ? 'debug' : 'info', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moar logs!1 #l33t
7c7396e
to
8439685
Compare
bonus: - improved error handling to reduce crashes - heaps of logging - add ‘@/‘ to absolute paths for best practices
8439685
to
aaee9e9
Compare
bonus: - improved error handling to reduce crashes in other areas (captcha, eslint clients) - heaps of logging (including debug mode #rejoice) - add ‘@/‘ to absolute paths to match current community/industry practices.
bonus: - improved error handling to reduce crashes in other areas (captcha, eslint clients) - heaps of logging (including debug mode #rejoice) - add ‘@/‘ to absolute paths to match current community/industry practices.
bonus: - improved error handling to reduce crashes in other areas (captcha, eslint clients) - heaps of logging (including debug mode #rejoice) - add ‘@/‘ to absolute paths to match current community/industry practices.
bonus: - improved error handling to reduce crashes in other areas (captcha, eslint clients) - heaps of logging (including debug mode #rejoice) - add ‘@/‘ to absolute paths to match current community/industry practices.
bonus: - improved error handling to reduce crashes in other areas (captcha, eslint clients) - heaps of logging (including debug mode #rejoice) - add ‘@/‘ to absolute paths to match current community/industry practices.
bonus: - improved error handling to reduce crashes in other areas (captcha, eslint clients) - heaps of logging (including debug mode #rejoice) - add ‘@/‘ to absolute paths to match current community/industry practices.
bonus: - improved error handling to reduce crashes in other areas (captcha, eslint clients) - heaps of logging (including debug mode #rejoice) - add ‘@/‘ to absolute paths to match current community/industry practices.
bonus: - improved error handling to reduce crashes in other areas (captcha, eslint clients) - heaps of logging (including debug mode #rejoice) - add ‘@/‘ to absolute paths to match current community/industry practices.
bonus: - improved error handling to reduce crashes in other areas (captcha, eslint clients) - heaps of logging (including debug mode #rejoice) - add ‘@/‘ to absolute paths to match current community/industry practices. (cherry picked from commit 966fcc5)
The ARGO platform contact form was borked by changes in auth management at the Helpdesk API.
Our Jira server's Basic auth now requires captchas, etc. so this app hasn't been able to submit new tix since summer 2023.
This PR changes the way we do auth to use Jira PATs (same user as before, see credentials in prod vault).
It also improves the error handling for that section of the app, so the pod doesn't crash if Jira becomes unreachable for a different reason, or similar issues arise later on.
Along the way, I've added a couple goodies: