Skip to content
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

Support for OKE Infra and Service Log Collection #100

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

paliwalparitosh
Copy link
Collaborator

No description provided.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Dec 4, 2024
charts/logan/templates/discovery-cronjob.yaml Show resolved Hide resolved
charts/logan/templates/discovery-cronjob.yaml Show resolved Hide resolved
charts/logan/values.yaml Show resolved Hide resolved
discovery_api = ["Allow dynamic-group ${local.dynamic_group_name} to {LOG_ANALYTICS_DISCOVERY_UPLOAD} in tenancy"],
tag_namespace = ["Allow dynamic-group ${local.dynamic_group_name} to use tag-namespaces in tenancy ${local.tags_policy_where_clause}"]
infra_discovery_stmt = [
"Allow dynamic-group ${local.dynamic_group_name} to inspect compartments in tenancy",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not need this in the default mode, only when proble_all where customer have to manually create this statement. It should go into documentation.

infra_discovery_stmt = [
"Allow dynamic-group ${local.dynamic_group_name} to inspect compartments in tenancy",
# https://docs.oracle.com/en-us/iaas/Content/Identity/Reference/contengpolicyreference.htm
"Allow dynamic-group ${local.dynamic_group_name} to use clusters in tenancy where target.cluster.id=${var.oke_cluster_ocid}",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change it to exact permission string instead of use verb

"Allow dynamic-group ${local.dynamic_group_name} to inspect compartments in tenancy",
# https://docs.oracle.com/en-us/iaas/Content/Identity/Reference/contengpolicyreference.htm
"Allow dynamic-group ${local.dynamic_group_name} to use clusters in tenancy where target.cluster.id=${var.oke_cluster_ocid}",
"Allow dynamic-group ${local.dynamic_group_name} to read cluster-node-pools in tenancy",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

restrict it to one compartment.

# Note:
# Customers will need to create additional policies to support VCN and subnets in non-OKE compartments
"Allow dynamic-group ${local.dynamic_group_name} to read vcns in ${local.oke_compartment_scope}",
"Allow dynamic-group ${local.dynamic_group_name} to use subnets in ${local.oke_compartment_scope}",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we try to find the permission strings if possible to replace the use verb

# Compartment of Logging LogGroup is not known at the time of policy creation via stack
# We assume that Logging Log Groups are only created in either OKE or ONM compartments
service_discovery_stmt = var.create_service_discovery_policies ? distinct([
"Allow dynamic-group ${local.dynamic_group_name} to manage log-groups in ${local.onm_compartment_scope}",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validate the case/behaviour of Service Stack, when the underlying resource/corresponding log/logGroup deleted

"Allow dynamic-group ${local.dynamic_group_name} to manage log-groups in ${local.onm_compartment_scope}",
"Allow dynamic-group ${local.dynamic_group_name} to manage log-groups in ${local.oke_compartment_scope}",

"Allow dynamic-group ${local.dynamic_group_name} to read log-content in ${local.onm_compartment_scope}",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets put a where clause to restrict this policy to service connector resource if that is sufficient

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants