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

B 20256-B Reapply int prevent prime users from accessing pptas #13517

Conversation

joeydoyecaci
Copy link
Contributor

@joeydoyecaci joeydoyecaci commented Aug 20, 2024

[B-20256](Prevent Prime users from accessing PPTAS)

Summary

Added Client cert authorization to PPTAS if the "allow_pptas" flag is set to true for a given user, and prevent acess if flag is false. Added pptas-client-api command

Important

Contains both 20256 and 19181 Code

Referencing PRs

Revert "B 19181 create pptas api
Revert "B 20256 main prevent prime users from accessing pptas
B 20256 main prevent prime users from accessing pptas
B 19181 create pptas api

Important

This cannot be tested (unless you have a secure migration already in place).

How to test:

1. you will need to get your CAC cert added to the client_cert table. Guide to do so here: How to Create CAC Access
2. run make server_run and make client_run
3. log into adminlocal
4. go to client_certs
5. find your cert. edit to set allow_pptas to true, then save
6. run the pptas-api-client command, using go run ./cmd/pptas-api-client --cac --insecure --port 9443 list-moves --since '2024-01-01' this should return some moves as a json.
7. switch allow_pptas to false
8. run go run ./cmd/pptas-api-client --cac --insecure --port 9443 list-moves --since '2024-01-01' again, a forbidden error should be returned
9. switch allow_pptas back to true
10. run go run ./cmd/pptas-api-client --cac --insecure --port 9443 list-moves --since '2024-01-01' again, this time moves should be returned as it has previously

CoryKleinjanCACI and others added 28 commits August 16, 2024 08:25
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.23.0 to 0.24.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](golang/tools@v0.23.0...v0.24.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [github.com/aws/aws-sdk-go-v2/service/ses](https://github.com/aws/aws-sdk-go-v2) from 1.22.7 to 1.25.3.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](aws/aws-sdk-go-v2@service/mq/v1.22.7...v1.25.3)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/ses
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
MAIN B-20791 refactor evaluation report to a route
…com/aws/aws-sdk-go-v2/service/ses-1.25.3
Bumps [go.opentelemetry.io/otel/exporters/stdout/stdouttrace](https://github.com/open-telemetry/opentelemetry-go) from 1.17.0 to 1.28.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](open-telemetry/opentelemetry-go@v1.17.0...v1.28.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/exporters/stdout/stdouttrace
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…telemetry.io/otel/exporters/stdout/stdouttrace-1.28.0

Bump go.opentelemetry.io/otel/exporters/stdout/stdouttrace from 1.17.0 to 1.28.0
Bumps [go.uber.org/zap](https://github.com/uber-go/zap) from 1.26.0 to 1.27.0.
- [Release notes](https://github.com/uber-go/zap/releases)
- [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md)
- [Commits](uber-go/zap@v1.26.0...v1.27.0)

---
updated-dependencies:
- dependency-name: go.uber.org/zap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.21.0 to 0.22.0.
- [Commits](golang/oauth2@v0.21.0...v0.22.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…into B-20256-INT-Prevent-Prime-users-from-accessing-PPTAS
@joeydoyecaci joeydoyecaci added G-Unit Scrum Team G INTEGRATION Slated for Integration Testing labels Aug 20, 2024
@robot-mymove
Copy link

robot-mymove commented Aug 20, 2024

Warnings
⚠️ This PR does not include changes to unit tests, even though it affects app code.

Generated by 🚫 dangerJS against c0e87ee

migrations/app/migrations_manifest.txt Outdated Show resolved Hide resolved
pkg/handlers/apitests.go Outdated Show resolved Hide resolved
@joeydoyecaci joeydoyecaci merged commit 27deb32 into integrationTesting Aug 21, 2024
32 checks passed
@joeydoyecaci joeydoyecaci deleted the B-20256-INT-Prevent-Prime-users-from-accessing-PPTAS branch August 21, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
G-Unit Scrum Team G INTEGRATION Slated for Integration Testing
Development

Successfully merging this pull request may close these issues.

9 participants