https://github.com/styrainc/eopa-ci-demo
https://github.com/styrainc/eopa-ci-demo
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/styrainc/eopa-ci-demo
- Owner: StyraInc
- Created: 2024-01-10T13:29:53.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-31T09:17:18.000Z (over 2 years ago)
- Last Synced: 2025-01-01T05:45:51.961Z (over 1 year ago)
- Language: Java
- Size: 79.1 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# eopa-ci-demo
This is an example demonstrating the use of Enterprise OPA and DAS in a CI/CD setting.
Currently, the instance(s) of EOPA used in the CI workflow will NOT use anything from DAS.
Eventually, this is what should happen: per-branch CI runs should take the policies from the
repository itself, and have EOPA run with those; fill whatever blanks exist with libraries
etc from DAS, as configured.
## Prerequirements
- docker compose
## Steps
Use `docker compose up --wait` to start everything. The first run will take particularly long,
because it's pulling images.
Then run `hurl` with the test/integration scripts,
docker compose run integration-tests
If you have [`hurl`](https://hurl.dev) installed locally, you can also try
hurl --test --glob 'test/integration/**/*.hurl' --report-html report
This command will create a neat little report html in the "report" directory.
## References
- The Spring Boot demo was taken from [this blog post](https://sultanov.dev/blog/externalized-authorization-using-opa-and-spring-security/),
and the code imported from [this repo](https://github.com/anarsultanov/examples/tree/c42d8bf1ea69d5ac3b94e54c552f6dc5a6cad509/spring-security-opa-authz).
Changes:
- the hardcoded OPA location
- policy code was updated
- pom.xml was adjusted, and a Dockerfile added