Commit Graph

13 Commits

Author SHA1 Message Date
Christian Muehlhaeuser 0e5b449219 Fixed typos in code
Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com>
2019-07-19 13:46:23 -07:00
Torin Sandall e4ae6a70e5 bundle: Cache compiler on storage context
These changes update the manager and bundle plugin to avoid parsing
and compiling modules during the manager's trigger callback. Since
policy queries are blocked while triggers execute, it's adavantageous
to cache the compiler that is obtained during bundle activation and
reduce the work done in the trigger callback.

Also, as part of these changes, the bundle plugin incorporates
remaining modules when it recompiles. This ensures that remaining
modules are correct.

Fixes #1515

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
2019-06-24 11:57:51 -07:00
Torin Sandall 56484c9b14 Refactor custom plugin interface
These changes refactor the custom plugin interface to bring it inline
with the bundle/decision logs/status built-ins. Specifically, the
plugin interface is being refactored to allow configuration to be
validated separate from plugin instantiation.

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
2019-01-10 14:52:14 -08:00
Torin Sandall 2d425494aa Refactor discovery implementation
These changes refactor the discovery implementation a bit to improve
test coverage and remove duplication of common logic shared with the
bundle plugin.

Specifically, the downloading logic has been moved into a separate
package that is shared by bundle and discovery. Second, test coverage in
the discovery implementation is increased from ~15% to ~85%.

These changes also include a few functional improvements:

- The default decision paths can be updated dynamically
- The decision logger can be enabled dynamically
- Discovery downloading errors are reported in status updates
- Discovery bundle is evaluated with all runtime params
- Custom plugins can be created dynamically
- Status updates include both discovery and bundle status

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
2018-12-08 00:45:36 +01:00
Ashutosh Narkar 2185f1eb86 Add support for configuration discovery
Previously OPA configuration for bundle downloading, status reporting, etc. had to be supplied in a configuration file on startup. With these changes, OPA can be configured to download a bundle that generates the OPA configuration. This allows OPA to boot with minimal configuration and dynamically update that configuration on-the-fly making it much easier to manage large deployments of OPAs for different use cases within the same system.

Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
2018-11-29 09:19:58 -08:00
Torin Sandall 61420f8e71 Add support for specifying services as object (#1046)
* Fix typo in run short description

Signed-off-by: Torin Sandall <torinsandall@gmail.com>

* Add support for specifying services as object

Previously the services configuration had to be specified as an array,
for example:

services:
- name: foo
  url: https://example.com

In some cases, it's easier to structure the configuration as an object.
Specifically, the Helm package manager does not allow you to override
values nested under arrays. These changes allow the services
configuration to be structured as an object:

services:
  foo:
    url: https://example.com

Ref: https://github.com/helm/helm/issues/1987

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
2018-10-30 08:02:30 -07:00
Varun Mathur 8885997264 Added ability to dynamically load .so objects and the respective required testing.
Signed-off-by: Varun Mathur <varun.mathur@live.com>
2018-08-16 13:11:49 -07:00
Torin Sandall 9e27dc2883 Remove unnecessary comments
Signed-off-by: Torin Sandall <torinsandall@gmail.com>
2018-04-16 08:35:15 -07:00
Ashutosh Narkar 5b7442cabc Registration framework for integrating plugins
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
2018-04-13 16:12:25 -07:00
Ashutosh Narkar 135911bb5e Register server for compiler change updates
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
2018-04-13 16:12:25 -07:00
Ashutosh Narkar c4e6e6eaef Added compiler instance to the plugin manager
Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
2018-04-13 16:12:25 -07:00
Torin Sandall 5e2084595c Add instance ID to OPA runtime
The instance ID can be included in outgoing messages to uniquely
identify the OPA instance.

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
2018-04-09 11:05:06 -07:00
Torin Sandall f131cfcff3 Add support for bundle downloading
Previously, policies and data had to be pushed into OPA via the REST API
or loaded via command line arguments at startup.

With these changes, OPA can now be configured to pull down bundles of
policy and data from remote HTTP servers. When a bundle is downloaded
successfully, the policies and data are loaded out of the bundle file
and inserted into storage.
2018-03-16 08:51:37 -07:00