-
Notifications
You must be signed in to change notification settings - Fork 126
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
Policy Template Factory #2714
Draft
jvanderhoof
wants to merge
42
commits into
master
Choose a base branch
from
policy-factory
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Policy Template Factory #2714
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- updates to policy - filter empty request params
a173698
to
0b86380
Compare
- Renamed `Factory` namespace to `Factories` - Refactored retrieval into a Repository
This ensures we detect the issue in which a http proxy is not correctly used with kube exec to inject the Conjur client certificate.
…in docs/Gemfile.lock Signed-off-by: Andy Tinkham <[email protected]>
This commit: - Adds support for regional STS endpoints. - Improves log messaging for failed requests. - Adds unit tests for all authenticator functionality.
Conjur is currently the only project which uses the conjur-rack gem. This PR brings it into Conjur to simplify the authorization process.
This commit: - Replaces a call to `git` with the equivalent Ruby call. This prevents a Git permission error. - Addresses all Rubocop warnings.
Failure caused by regex update in #2792
Includes RSpec unit tests for these cases, along with VCR cassettes to playback authentic Identity responses.
- Spawn multiple processes to execute cucumber tests in parallel. Each process contains it's own indipendent conjur instance and postgresql database to avoid colisions. - Dynamically alter Ruby ENV variables based on the process executing the cucumber feature tests. - Dockerfile has been altered to support replicated services for parallel tests (this has not been altered to be dynamic and consists of static changes). - Alter cucumber.yml profiles to support parallel_tests ruby gem cmd usage The following tests have not been parallelized: - authenticators_k8s - rspec tests
- updates to policy - filter empty request params
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This work is an extension of the my Hackathon effort from this past fall, which aimed enable an API for generating a variety of Conjur resources.
This effort:
Overview
Factory Structure
Factories are stored in Conjur Variables as Base64 encoded values. The above examples are all stored in the
conjur/factories/core
policy. Shortly, we'll addconjur/factories/authenticators
to encapsulate authenticator creation.The API selects the desired policy (ex.
core
orauthenticators
) as well as the target variable name (group
,policy
,user
,managed-policy
, etc), we have an immense amount of flexibility to organize and create factories in the future.Using JSON Schema, each factory defines the inputs it requires and and optionally accepts. This information is available through the factory's
info
endpoint. This allows us to dynamically include these endpoints in CLIs and SDKs in the future.Security
Factory endpoint requests require
execute
permission on the Factory variable and appropriate permssion on the target Policy. This allows Conjur RBAC to be used to manage who/what can use Factories to extend policy, and all actions are captured in Conjur Audit.Demo
To install the base policies required for the Policy Factory, run the following command on Conjur (Conjur needs to be running):
The above command will install a base policy into the
conjur/factories
namespace. This base policy includes factories for creating Conjur (all in thecore
namespace):Group
ManagedPolicy
- creates a policy with an owner groupPolicy
User
With the above factory templates, the following API endpoints become available:
API Overview
Group Endpoint Information
Response:
Create Group
Accepts a JSON object with the following params:
The above will commit the following into the
foo/bar/baz
namespace:The above API was created from the following schema:
and uses the following policy template:
Managed Policy Endpoint Information
Response:
Create Managed Policy
This endpoint creates a policy with a corresponding owner group.
Accepts a JSON object with the following params:
The above will commit the following into the
foo/bar/baz
namespace:The above API was created from the following schema:
and uses the following policy template:
Policy Endpoint Information
Response:
Create Policy
Accepts a JSON object with the following params:
The above will commit the following policy into the
foo/bar/baz
namespace, owned by the Conjur groupfoo-bar
:The above API was created from the following schema:
and uses the following policy template:
User Endpoint Information
Response:
Create User
Accepts a JSON object with the following params:
The above will commit the following into the
foo/bar/baz
namespace:The above API was created from the following schema:
and uses the following policy template:
Connected Issue/Story
N/A
Definition of Done
At least 1 todo must be completed in the sections below for the PR to be
merged.
Changelog
CHANGELOG update
Test coverage
changes, or
Documentation
README
s) were updated in this PRBehavior
Security