Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
IAM Reference
Reference for Lenses IAM.
Examples
Examples of IAM Policies
This page describes Users in Lenses.
Users are assigned to groups. The groups inherit permissions from the roles assigned to the groups.
User can be manually created in Lenses. Users can either be of type:
SSO, or
Basic Authentication
When creating a User, you can assign them groups membership.
Each user, once logged in can update their Name, Profile Photo and set an email address.
For SSO, your SSO email is still required to login
To Create Service Account go to IAM->Users->New User, once created you can assign the user to a group.
You can also manage Users via the CLI and YAML, for integration in your CI/CD pipelines.
This section provides example IAM policies for Lenses.
These are only some same policies to help you build your own
Full admin across all resources.
Allow full access for all services and resources beginning with blue.
Allow read only access for topics and schemas beginning with la.
Allow operators to restart connectors and list & get IAM resource only.
No access to data!
Explicity deny access to a production environment.
Allow developers access to topics, schemas, sql processors, consumer groups, acls, quotas, connectors for us-dev.
This page describes an overview of Lenses IAM (Identify & Access Management)
Principals (Users & Service accounts) receive their permissions based on their group membership.
Roles hold a set of policies, defining the permissions. Roles are assigned to groups.
Roles provide flexibility in how you want to provide access, you can create policy that is very open or a policy that is very granular, for example allowing operators and support engineers certain permissions to restart Connectors but denying actions that would allow them to view data or configuration options.
Roles are defined at the HQ level. This allows you to control access to not only actions at HQ but at lower environment levels, and to assign the same set of permissions across your whole Kafka landscape in a central place.
A role has:
A unique name;
A list of Permission Statements called a Policy.
A policies have:
One or more actions;
One or more resource patterns that the actions apply to;
An effect: allow or deny.
If any effect is deny for a resource the result is always deny, the principle of least privileged applies.
A policy is defined by a YAML specification.
Actions describe a set of actions. Concrete actions can match an Action Pattern. In this text, action and action patterns are used interchangeably.
An action has the format: service:operation
, e.g. iam:DeleteUser
Services describe the system entity that an action applies to. Services are:
environments
kafka
registry
schemas
kafka-connect
sql-streaming
kubernetes
applications
alerts
data-policies
governance
audit
iam
administration
Operation can contain a wildcard. If so, only at the end. See IAM Reference for the available operations per service.
Resources identify which resource, in a service, that the principal is allowed or denied, to perform the operation on.
Resource-type cannot contain a combination of characters with wildcards.
If the service is provided, resource-type can be a wildcard.
The resource path identifies the resource within the context of a service and a resource type.
A resource-path consists of one or more segments separated by /. A segment can be a wildcard, or contain a wildcard as a suffix of a string. If a segment is a wildcard, then remaining segments do not need to be provided, and will be assumed to be wildcards as well.
The format is service:resource-type:resource-path
Where LRN is the Lenses Resource Name
kafka:topic/my-env/* will be expanded to kafka:topic/my-env/*/*;
kafka:topic/my-env/my-cluster* is invalid because the Topic segment is missing, kafka:topic/my-env/my-cluster*/topic would be valid though;
*:topic/* is invalid, the service is not provided;
kaf*:* and kafka:top* are invalid, service and resource-type cannot contain wildcards;
kafka:*/foo is invalid, if the resource-type is a wildcard then resource-id cannot be set.
A principal (user or service account) can perform an action on a resource if:
In any of the roles it receives via group membership:
There is any matching Permission Statement that has an effect of allow;
And there is not any matching Permission Statement that has an effect of deny.
A Permission Statement matches an action plus resource, if:
The action matches any of the Permission Statement's Action Patterns, AND:
The resource matches any of the Permission Statement's Resource Patterns.
An Action matches an Action Pattern (AP) if:
The AP is a wildcard, OR:
The Action's service equals the AP's and the AP's operation string-matches the Action's operation.
A Resource matches a Resource Pattern (RP) if:
The RP is a wildcard, OR:
The Resource's services equals the RP's and the RP's resource-type is a wildcard, OR:
The Resource's service and types equals that of the RP and resource-ids match. Resource-ids are matched by string-matching each individual segment. If the RP has a trailing wildcard segment, the remaining segments are ignored.
A string s matches p if:
They equal character by character.
If s or p has more non-wildcard characters than the other they don't match;
If p contains a * suffix, any remaining characters in s are ignored.
Order of items in any collection is irrelevant during evaluation. Collections are considered sets rather than ordered lists. The following are equivalent:
Order of Resource Patterns does not matter
Order of Permission Statements does not matter
Order of Roles does not matter
Order of Groups does not matter
In the examples we're not too religious about strict JSON formatting.
Broad Allow + Specific Deny
Given:
A principal:
Can ReadKafkaData on kafka:topic/my-env/the-cluster/some-topic because it is allowed and not denied;
Cannot DeleteKafkaTopic on kafka:topic/my-env/the-cluster/some-topic because there is no allow;
Cannot ReadKafkaData on kafka:topic/my-env/the-cluster/forbidden-topic because while it is allowed the deny kicks in.
Given:
A principal:
Can ReadKafkaData on kafka:topic/someone-else-cluster/their-topic because the resource matches *.
Note that here the matching can be considered "most permissive".
Given:
A principal:
Can ReadKafkaData
on k
afka:topic/my-cluster/my-topic-1 and kafka:topic/my-cluster/my-topic-2 because the resources match, but cannot ReadKafkaData on kafka:topic/my-cluster/my-topic-3.
This page describes Roles in Lenses.
Lenses IAM is built around Roles. Roles contain policies and each policy defines a set of actions a user is allow to take.
Roles are then assigned to groups.
The Lenses policies are resource based. They are YAML based documents attached to a resource.
Each policy has:
Action
Resource
Effect
The action describes the action or verb that a user can perform. The format of the action is
For example to list topics in Kafka
For a full list of the actions see Permission Reference.
To allow all actions set '*'
To restrict access to resources, for example, only list topics being with red we can used use the resource field.
For a full list of the actions see Permission Reference.
To allow all actions set '*'
Effect is either allow the action on the resource or deny. If allow is not set the action will be denied and if any policy for a resource has a deny effect it takes precedence.
To Create Service Account go to IAM->Roles->New Role.
You can also manage Users via the CLI and YAML, for integration in your CI/CD pipelines.
This page describes Service account in Lenses.
Service accounts are intended for programmatic access to Lenses.
Service accounts are assigned to groups. The groups inherit permissions from the roles assigned to the groups.
Each service account has a key that is used to authenticate and identify the service account.
In addition you can set:
Description
Resource name - Must be unique across Lenses.
Key expiry
Regenerate the key
Key expiry can be 7, 30, 60, 90 days, 1 year or a custom expiration or no expiration at all.
To Create Service Account go to IAM->Service Accounts->New Service Account, once created you can then assign service accounts to groups.
You can also manage Users via the CLI and YAML, for integration in your CI/CD pipelines.
This page describes IAM groups in Lenses.
Groups are a collection of users, service accounts and roles.
Users can be assign to Groups in two ways:
Manual
Linked from the groups provided by your SSO provider
This behaviour can be toggled in the organizational settings of your profile. To control the default set the following in the config.yaml for HQ.
Groups can be defined with the following metadata:
Colour
Description
Each group has a resource that unique identifies it across an HQ installation.
To Create Group go to IAM->Groups->New Group, create the group, assign members, service accounts and roles.
You can also manage Users via the CLI and YAML, for integration in your CI/CD pipelines.
This page describes the IAM Reference options.
service: administration
Resource Syntax
admin:connection:${Environment}/${ConnectionType}/${Connection}
admin:license:${Environment}
admin:lenses-logs:${Environment}
admin:lenses-configuration:${Environment}
admin:setting:${Setting}
Operation | Resource Type | Description |
---|---|---|
service: applications
Resource Syntax
service: alerts
Resource Syntax
alerts:alert:${Environment}/${AlertType}/${Alert}
alerts:rule:${Environment}/Infrastructure/KafkaBrokerDown
alerts:rule:${Environment}/DataProduced/red-app-going-slow
service: audit
Resource Syntax
audit:log:${Environment}
audit:channel:${Environment}/${AuditChannelType}/${AuditChannel}
service: data-policies
Resource Syntax
data-policies:policy/${Environment}/${Policy}
service: environments
Resource Syntax
environments:environment/${Environment}
service: governance
Resource Syntax
governance:request:${Environment}/${ActionType}/*
governance:rule:${Environment}/${RuleCategory}/*
service: iam
Resource Syntax
iam:role:${Role}
iam:group:${Group}
iam:user:${Username}
iam:service-account:${ServiceAccount}
service: kafka-connect
Resource Syntax
kafka-connect:connector:${Environment}/${KafkaConnectCluster}/${Connector}
kafka-connect:cluster:${Environment}/${KafkaConnectCluster}
service: kafka
Resource Syntax
kafka:topic:${Environment}/${KafkaCluster}/${Topic}
kafka:acl:${Environment}/${KafkaCluster}/${AclResourceType}/* or kafka:acl:${Environment}/${KafkaCluster}/${AclResourceType}/${PrincipalType}/${Principal}
kafka:quota:${Environment}/${KafkaCluster}/${QuotaType}/* or
kafka:quota:${Environment}/${KafkaCluster}/clients
kafka:quota:${Environment}/${KafkaCluster}/users-default
kafka:quota:${Environment}/${KafkaCluster}/client/${ClientID}
kafka:quota:${Environment}/${KafkaCluster}/user/${Username}
kafka:quota:${Environment}/${KafkaCluster}/user/${Username}/client/${ClientID}
kafka:quota:${Environment}/${KafkaCluster}/user-client/${Username}/${ClientID}
kafka:quota:${Environment}/${KafkaCluster}/user/${Username}/client/*
kafka:quota:${Environment}/${KafkaCluster}/user-all-clients/${Username}
service: kubernetes
Resource Syntax
kubernetes:cluster:${Environment}/${KubernetesCluster}
kubernetes:namespace:${Environment}/${KubernetesCluster}/${KubernetesNamespace}
service: registry
Resource Syntax
schemas:registry:${Environment}/${SchemaRegistry}
service: schemas
Resource Syntax
schemas:schema:${Environment}/${SchemaRegistry}/${Schema}
service: sql-streaming
Resource Syntax
sql-streaming:sql-processor:${Environment}/${KubernetesCluster}/${KubernetesNamespace}/${SqlProcessor}
For IN_PROC processors sql-streaming:sql-processor:${Environment}/lenses-in-process/default/${SqlProcessor}
p | s | match |
---|---|---|
Operation | Resource Type | Description |
---|---|---|
Operation | Resource Type | Description |
---|---|---|
Operation | Resource Type | Description |
---|---|---|
Operation | Resource Type | Description |
---|---|---|
Operation | Resource Type | Description |
---|---|---|
Operation | Resource Type | Description |
---|---|---|
Operation | Resource Type | Description |
---|---|---|
Operation | Resource Type | Description |
---|---|---|
Operation | Resource Type | Description |
---|---|---|
Operation | Resource Type | Description | Example |
---|---|---|---|
Operation | Resource Type | Description |
---|---|---|
Operation | Resource Type | Description |
---|---|---|
Available Actions | Resource Type | Description |
---|---|---|
"lit"
"lit"
true
"lit"
"li"
false
"lit"
"litt"
false
"lit"
"oth"
false
"*"
"some"
true
"foo*"
"foo"
true
"foo*"
"foo-bar"
true
""
""
true
"x"
""
false
""
"x"
false
CreateConnection
connection
ListConnections
connection
GetConnectionDetails
connection
UpdateConnection
connection
DeleteConnection
connection
ListLicenses
license
GetLicenseDetails
license
UpdateLicense
license
GetLensesLogs
lenses-logs
GetLensesConfiguration
lenses-configuration
ListAgents
agent
GetAgentDetails
agent
UpdateAgent
agent
DeleteAgent
agent
GetSetting
setting
UpdateSetting
setting
RegisterApplication
external-application
UnregisterApplication
external-application
ListApplications
external-application
GetApplicationDetails
external-application
ListApplicationDependants
external-application
CreateAlertRule
rule
DeleteAlertRule
rule
UpdateAlertRule
rule
ListAlertRules
rule
GetAlertRuleDetails
rule
ToggleAlertRule
rule
ListAlertEvents
alert-event
DeleteAlertEvents
alert-event
CreateChannel
alert-channel
ListChannels
alert-channel
GetChannelDetails
alert-channel
UpdateChannel
alert-channel
DeleteChannel
alert-channel
ListLogEvents
log
GetLogEventDetails
log
CreateChannel
channel
ListChannels
channel
GetChannelDetails
channel
UpdateChannel
channel
DeleteChannel
channel
ToggleChannel
channel
CreatePolicy
policy
ListPolicies
policy
GetPolicyDetails
policy
UpdatePolicy
policy
DeletePolicy
policy
ListPolicyDependants
policy
CreateEnvironment
environment
DeleteEvironment
environment
ListEnvironment
environment
UpdateEnvironment
environment
AccessEnvironment
environment
CreateRequest
request
ListRequests
request
GetRequestDetails
request
ApproveRequest
request
DenyRequest
request
GetRuleDetails
rule
UpdateRule
rule
CreateRole
role
DeleteRole
role
UpdateRole
role
ListRoles
role
ListRoleDependants
role
GetRoleDetails
role
CreateGroup
group
DeleteGroup
group
UpdateGroup
group
ListGroups
group
ListGroupDependants
group
GetGroupDetails
group
CreateUser
user
DeleteUser
user
UpdateUser
user
ListUsers
user
ListUserDependants
user
GetUserDetails
user
CreateServiceAccount
service account
DeleteServiceAccount
service account
UpdateServiceAccount
service account
ListServiceAccounts
service account
ListServiceAccountDependants
service account
GetServiceAccountDetails
service account
CreateConnector
connector
ListConnectors
connector
ListConnectors
connector
GetConnectorConfiguration
connector
UpdateConnectorConfiguration
connector
DeleteConnector
connector
StartConnector
connector
StopConnector
connector
ListConnectorDependants
connector
ListClusters
cluster
GetClusterDetails
cluster
DeployConnectors
cluster
CreateTopic
topic
DeleteTopic
topic
ListTopic
topic
GetTopicDetails
topic
UpdateTopicDetails
topic
ReadTopicData
topic
WriteTopicData
topic
DeleteTopicData
topic
ListTopicDependants
topic
CreateAcl
acl
GetAclDetails
acl
UpdateAcl
acl
DeleteAcl
acl
CreateQuota
quota
ListQuotas
quota
GetQuotaDetails
quota
UpdateQuota
quota
DeleteQuota
quota
DeleteConsumerGroup
consumer-group
UpdateConsumerGroup
consumer-group
ListConsumerGroups
consumer-group
GetConsumerGroupDetails
consumer-group
ListConsumerGroupDependants
consumer-group
ListClusters
cluster
GetClusterDetails
cluster
ListNamespaces
namespace
DeployApps
namespace
GetRegistryConfiguration
registry
UpdateRegistryConfiguration
registry
CreateSchema
schema
DeleteSchema
schema
UpdateSchema
schema
GetSchemaDetails
schema
ListSchemas
schema
ListSchemaDependants
schema
CreateProcessor
sql-processor
ListProcessors
sql-processor
GetProcessorDetails
sql-processor
GetProcessorSql
sql-processor
UpdateProcessorSql
sql-processor
DeleteProcessor
sql-processor
StartProcessor
sql-processor
StopProcessor
sql-processor
ScaleProcessor
sql-processor
GetProcessorLogs
sql-processor
ListProcessorDependants
sql-processor