## Description
Isolating PICS custom changes
## Motivation and Context
It's hard to understand what are our custom changes and what is from
OAuth2-Proxy main repo
## How Has This Been Tested?
Created a local container image of the oauth-proxy from this PR and
integrated it with Reporting locally.
- run in the root of this repo
- docker buildx build -t oauth-local .
- Updated FROM statement in pics/src/services/Oauth2Proxy/Dockerfile to
- FROM oauth-local
The following flows were checked:
- Login
- Audit logs
- Logout
## Checklist:
- [x] Isolating some dunction in separated files
- [x] Creating a folder for Pics packages
Removing blank lines/spaces/tabs differences with upstream
## Motivation and Context
Minimize conflicts when merging a new version
## How Has This Been Tested?
## Checklist:
- [x] Reverted formatting changes to minimize conflicts
* Issue 2311: runtime error: index out of range [0] with length 0 while extracting state of of the csrf
---------
Co-authored-by: tuunit <jan@larwig.com>
## Description
Adding custom audit metric for audit errors.
## Motivation and Context
This is needed to track audit errors and create alerts when they happen.
## How Has This Been Tested?
Built a local copy from this PR and integrated it with Reporting locally
by running the binary. Used invalid audit environment variables to make
the audit request fail.
Commands:
- make build
- set envs (grab from Pics containers) and include invalid audit envs
- ./oauth2-proxy --http-address=127.0.0.1:9876
--https-address=127.0.0.1:9877 --metrics-address=127.0.0.1:9090
- change evs in .env.local.worklist-gateway file in pics repo (worklist
Oauth) to OAUTH_PROXY_ENDPOINT=host.docker.internal and
OAUTH_PROXY_PORT=9876
- run pics

* Remove trailing whitespaces in contribution.md
They make the pre-commit hook "trailing-whitespace" fail.
* Correct Go version in DevContainer and Contibution guide