Add rules to the config repo
See original GitHub issueIssue Type
- Feature enhancement
Summary
Epic Issue: #5175 (search for Better authorization
), #3636
Proposal: Add Rules
to the config repo to allow/deny creation/access to environments, pipeline groups and pipelines.
The rules defined for that config repo will govern what all entities can be added/referred to the GoCD. Proposed actions are:
Action | Entity Type | Description |
---|---|---|
create | environment/pipeline_group/pipeline | allow/deny ability to create a new environment/pipeline group/pipeline with the specified pattern |
refer | environment | allow/deny pipelines(and agents?) to be added to the specified environment |
refer | pipeline_group | allow/deny pipelines to be added to the specified pipeline group |
refer | pipeline | allow/deny the specified pipeline to be used as an upstream dependency |
Note: Deny
rule will take precedence.
Example of the config:
<config-repo pluginId="json.config.plugin" id="json">
<git url="/tmp/config-repo" />
<rules>
<allow action="refer" type="environment">env_*</allow>
<allow action="create" type="pipeline_group">grp_*</allow>
</rules>
</config-repo>
Need to decide:
- Should the agents addition to environment be restricted as well?
- Will the default rule to be
deny
all? The existing GoCD installations using config-repos may break if so. (Maybe we can do a config migration to get around this?) - Should we consider the rules while checking the definitions (via repoId) on preflight API?
More questions based on comments
- Will there be a need to modify RBAC for config-repo?
Conclusion
Possible actions
Action | Entity Type | Description |
---|---|---|
refer | environment | allow/deny pipelines and agents to be added to the specified environment |
refer | pipeline_group | allow/deny pipelines to be added to the specified pipeline group |
refer | pipeline | allow/deny the specified pipeline to be used as an upstream dependency |
Additional Info
deny
rule will take precedence.- Should the agents addition to environment be restricted as well?: Yes
- Will the default rule to be
deny
all? The existing GoCD installations using config-repos may break if so. (Maybe we can do a config migration to get around this?): Yes, the default rule will bedeny
. Will consider a config migration to add a defaultallow
all entity. - Should we consider the rules while checking the definitions (via repoId) on preflight API?: Yes
- Will there be a need to modify RBAC for config-repo?: No, since it is an option that has to be explicitly given, no need to make any change in RBAC
Issue Analytics
- State:
- Created 4 years ago
- Comments:34 (33 by maintainers)
Top Results From Across the Web
New AWS Config Rules Repository on GitHub with sample rules
Create custom rules using the sample rules available in the new GitHub repository. To learn more, visit AWS Blog. Additional resources: AWS ...
Read more >Repo Browser: AWS Organizations Config Rules - Gruntwork
What resources does this module create? This module creates the following AWS Config Managed Rules: encrypted-volumes: Checks whether the EBS volumes that are ......
Read more >How to add rules.pl - Google Groups
The above steps initializes an empty git repository and pulls the refs/meta/config from your Gerrit project. After that you can edit the file...
Read more >AWS Config Rule Repository - A Secure Cloud
Repository of AWS Config rules examples - both AWS managed and custom Config ... Add to Stack ... A config rule that checks...
Read more >Repository Rules - Bazel
A custom repository rule can be used just like a native repository rule. It has a mandatory name attribute and every target present...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Summarizing:
rules
will be added to the config repo to allow/deny creation/access to environments, pipeline groups and pipelines.The rules defined for that config repo will govern what all entities can be added/referred to the GoCD. Proposed actions are:
Note:
deny
rule will take precedence.Example of the config:
deny
all? The existing GoCD installations using config-repos may break if so. (Maybe we can do a config migration to get around this?): Yes, the default rule will bedeny
. Will consider a config migration to add a defaultallow
all entity.Does this need any change?
Ok, I can live with that.