Commit Graph

9 Commits

Author SHA1 Message Date
Johan Fylling 7bb6dbe36b Preparing for v1 API
Moving (most) source to v1 root package to prepare for v0/v1 API separation.

Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2024-12-12 15:09:03 +01:00
Johan Fylling 5521453d87 cmd: Adding --v0-compatible flag (#7065)
To make OPA behave as v0.x post v1.0 release.
If used simultaneously with `--v1-compatible` flag, the `--v0-compatible` flag takes precedence.

Also, future-proofing `cmd` package tests for 1.0.

Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2024-09-26 00:45:51 +02:00
Johan Fylling 5464b005e8 Bumping golangci-lint to v1.59.1 (#6817)
Signed-off-by: Johan Fylling <johan.dev@fylling.se>
2024-06-19 15:13:43 +02:00
Colin J Lacy 4bfae4e64e cmd: add env var backups to command flags (#6508)
Signed-off-by: Colin Lacy <colinjlacy@gmail.com>
2024-01-29 15:15:35 +01:00
Anders Eknert 8f5500d078 cli: try fix issues reported in 'oracle' command (#5678)
Try and fix errors issues reported here:
https://github.com/open-policy-agent/vscode-opa/issues/81

1. Only include .rego files in definition location checks
2. Don't hang if input not provided on stdin

Signed-off-by: Anders Eknert <anders@styra.com>
2023-02-22 11:40:41 +01:00
Anders Eknert 9a597feb2e chore: don't use the deprecated ioutil functions (#5319)
Another annoyance removed :P

Signed-off-by: Anders Eknert <anders@eknert.com>
2022-10-27 14:30:26 +02:00
Stephan Renatus fb301d2713 cmd,storage: fix int conversion type errors (#3975)
Also fixes a panic in `opa oracle find-definition file:12` is file
didn't exit.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2021-11-06 08:49:38 +01:00
Ashutosh Narkar 338583c18a Add support for OPA bundle signatures
These changes add support for digital signatures for policy bundles which
can be used to verify their authenticity.

Bundle signature verification involves the following steps:

* Verify the JWT signature
* Verify the files in the JWT payload exist in the bundle
* Verify the file content of the files in bundle match with those in the payload

This commit adds a new `sign` command to generate a digital signature for policy bundles.

For more details, run "opa sign --help"

The signatures generated by the 'sign' command can be verified by the
'build' command. The 'build' command can also sign the bundle it generates.

The 'run' command can verify a signed bundle or skip verification altogether.

OPA 'sign', 'build' and 'run' can be used to
sign/verify bundles in bundle mode (--bundle) mode only. Verification
can be also be performed when bundle downloading is enabled.

Fixes: #1757

Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
2020-07-14 09:49:59 -04:00
Torin Sandall f24868d4a3 internal/oracle: Add new package for querying ASTs with text locations
Signed-off-by: Torin Sandall <torinsandall@gmail.com>
2020-05-19 06:50:50 -04:00