-
Notifications
You must be signed in to change notification settings - Fork 91
Add provider_permissions field for declaring integration permission requirements #1180
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
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -84,6 +84,8 @@ spec: | |||||||||||||
| $ref: "../integration/manifest.spec.yml#/definitions/var_groups" | ||||||||||||||
| sections: | ||||||||||||||
| $ref: "../integration/manifest.spec.yml#/definitions/sections" | ||||||||||||||
| provider_permissions: | ||||||||||||||
| $ref: "../integration/manifest.spec.yml#/definitions/provider_permissions" | ||||||||||||||
| input: | ||||||||||||||
| type: string | ||||||||||||||
| examples: | ||||||||||||||
|
|
@@ -146,6 +148,8 @@ spec: | |||||||||||||
| $ref: "../integration/manifest.spec.yml#/definitions/var_groups" | ||||||||||||||
| sections: | ||||||||||||||
| $ref: "../integration/manifest.spec.yml#/definitions/sections" | ||||||||||||||
| provider_permissions: | ||||||||||||||
| $ref: "../integration/manifest.spec.yml#/definitions/provider_permissions" | ||||||||||||||
| owner: | ||||||||||||||
| $ref: "../integration/manifest.spec.yml#/definitions/owner" | ||||||||||||||
| agent: | ||||||||||||||
|
|
@@ -172,6 +176,12 @@ spec: | |||||||||||||
|
|
||||||||||||||
| # JSON patches for newer versions should be placed on top | ||||||||||||||
| versions: | ||||||||||||||
| - before: 3.7.0 | ||||||||||||||
| patch: | ||||||||||||||
| - op: remove | ||||||||||||||
| path: "/properties/provider_permissions" | ||||||||||||||
| - op: remove | ||||||||||||||
| path: "/properties/policy_templates/items/properties/provider_permissions" | ||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JSON patches would not be needed if this new setting doesn't affect existing versions of Fleet.
Suggested change
|
||||||||||||||
| - before: 3.6.0 | ||||||||||||||
| patch: | ||||||||||||||
| - op: remove | ||||||||||||||
|
|
||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -706,10 +706,17 @@ spec: | |||||||||||
| $ref: "../../integration/manifest.spec.yml#/definitions/categories" | ||||||||||||
| deprecated: | ||||||||||||
| $ref: "../../integration/manifest.spec.yml#/definitions/deprecated" | ||||||||||||
| provider_permissions: | ||||||||||||
| $ref: "../../integration/manifest.spec.yml#/definitions/provider_permissions" | ||||||||||||
| required: | ||||||||||||
| - title | ||||||||||||
| # JSON patches for newer versions should be placed on top | ||||||||||||
| versions: | ||||||||||||
| - before: 3.7.0 | ||||||||||||
| patch: | ||||||||||||
| # provider_permissions field for provider-specific permission declarations. | ||||||||||||
| - op: remove | ||||||||||||
| path: "/properties/provider_permissions" | ||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JSON patches would not be needed if this new setting doesn't affect existing versions of Fleet.
Suggested change
|
||||||||||||
| - before: 3.6.0 | ||||||||||||
| patch: | ||||||||||||
| - op: add | ||||||||||||
|
|
||||||||||||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -736,6 +736,85 @@ spec: | |||
| type: string | ||||
| examples: | ||||
| - httpjson | ||||
| provider_permissions: | ||||
| description: > | ||||
| Permissions and roles this integration unit requires from the named provider. | ||||
| May be declared at package, policy_template, input, and data_stream levels. | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we document how different levels of declaring this permissions work? what if i declare it at package and then at an input? does it override? Are there any cases where we might need to check semantically the meaning of this permissions across levels? Is there any case we want to avoid? or validate? |
||||
| type: array | ||||
| items: | ||||
| type: object | ||||
| additionalProperties: false | ||||
| required: | ||||
| - provider | ||||
| properties: | ||||
| provider: | ||||
| description: > | ||||
| Identifier of the provider these permissions apply to | ||||
| (e.g. "aws", "gcp", "azure", "kubernetes", "okta"). | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
as we have them as example on the |
||||
| type: string | ||||
| examples: | ||||
| - aws | ||||
| - gcp | ||||
| - azure | ||||
| - kubernetes | ||||
| - okta | ||||
| - github | ||||
| description: | ||||
| description: Human-readable description of why these permissions are needed. | ||||
| type: string | ||||
| roles: | ||||
| description: Pre-defined roles or managed policies to attach alongside inline permissions. | ||||
| type: array | ||||
| items: | ||||
| type: object | ||||
| additionalProperties: false | ||||
| required: | ||||
| - name | ||||
| properties: | ||||
| name: | ||||
| description: Display name of the role or managed policy. | ||||
| type: string | ||||
| examples: | ||||
| - SecurityAudit | ||||
| - Storage Blob Data Reader | ||||
| - roles/logging.viewer | ||||
| - cluster-reader | ||||
| id: | ||||
| description: Provider-specific identifier for this role or managed policy. | ||||
| type: string | ||||
| examples: | ||||
| - arn:aws:iam::aws:policy/SecurityAudit | ||||
| - roles/storage.objectViewer | ||||
| - 2a2b9908-6ea1-4ae2-8e65-a410df84e7d1 | ||||
| description: | ||||
| description: Human-readable description of this role. | ||||
| type: string | ||||
| permissions: | ||||
| description: Individual permission grants required by this integration unit. | ||||
| type: array | ||||
| items: | ||||
| type: object | ||||
| additionalProperties: false | ||||
| required: | ||||
| - name | ||||
| properties: | ||||
| name: | ||||
| description: Provider-specific permission or action name. | ||||
| type: string | ||||
| examples: | ||||
| - s3:GetObject | ||||
| - ec2:DescribeInstances | ||||
| - storage.objects.get | ||||
| - monitoring.timeSeries.list | ||||
| - Microsoft.Compute/virtualMachines/read | ||||
| - Microsoft.Insights/metrics/read | ||||
| - pods:list | ||||
| - namespaces:get | ||||
| - okta.users.read | ||||
| - contents:read | ||||
| description: | ||||
| description: Human-readable description of why this permission is needed. | ||||
| type: string | ||||
| properties: | ||||
| format_version: | ||||
| description: The version of the package specification format used by this package. | ||||
|
|
@@ -766,6 +845,8 @@ spec: | |||
| $ref: "#/definitions/categories" | ||||
| conditions: | ||||
| $ref: "#/definitions/conditions" | ||||
| provider_permissions: | ||||
| $ref: "#/definitions/provider_permissions" | ||||
| # requires a conditional JSON schema to update the value depending | ||||
| # on the policy_templates length | ||||
| policy_templates_behavior: | ||||
|
|
@@ -903,6 +984,8 @@ spec: | |||
| type: string | ||||
| examples: | ||||
| - credential_type: [cloud_connectors] | ||||
| provider_permissions: | ||||
| $ref: "#/definitions/provider_permissions" | ||||
| required: | ||||
| - title | ||||
| - description | ||||
|
|
@@ -923,6 +1006,8 @@ spec: | |||
| $ref: "#/definitions/sections" | ||||
| deprecated: | ||||
| $ref: "#/definitions/deprecated" | ||||
| provider_permissions: | ||||
| $ref: "#/definitions/provider_permissions" | ||||
| required: | ||||
| - name | ||||
| - title | ||||
|
|
@@ -991,6 +1076,17 @@ spec: | |||
|
|
||||
| # JSON patches for newer versions should be placed on top | ||||
| versions: | ||||
| - before: 3.7.0 | ||||
| patch: | ||||
| # provider_permissions field for provider-specific permission declarations. | ||||
| - op: remove | ||||
| path: "/definitions/provider_permissions" | ||||
| - op: remove | ||||
| path: "/properties/provider_permissions" | ||||
| - op: remove | ||||
| path: "/properties/policy_templates/items/properties/provider_permissions" | ||||
| - op: remove | ||||
| path: "/properties/policy_templates/items/properties/inputs/items/properties/provider_permissions" | ||||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||||
| - before: 3.6.0 | ||||
| patch: | ||||
| # Input qualifier (named inputs). | ||||
|
|
||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there any change required on the kibana side for this to be released?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we will use the provider_permissions from kibana to generate a list of required permissions in the onboarding flow: https://github.com/elastic/ingest-dev/issues/7927
there should be no dependency on kibana, the new fields are additive and won't be used on old kibana versions (should be smoke tested)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this doesn't affect existing versions of Kibana we can release this in 3.6.4, and use it on any package.