Skip to content

Instantly share code, notes, and snippets.

@alces
Created July 6, 2020 12:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alces/ea3253efd2e5b12fadd0fcaf611ce08a to your computer and use it in GitHub Desktop.
Save alces/ea3253efd2e5b12fadd0fcaf611ce08a to your computer and use it in GitHub Desktop.
Manipulating groups with lenses-cli
# Nice doc is here: https://docs.lenses.io/dev/lenses-cli/index.html
LENSES_CLI_CMD="lenses-cli --host https://10.0.17.20:9991/ --user admin --pass admin --insecure groups"
# Get the list
$LENSES_CLI_CMD get --output JSON
# Group config file
cat > config.yaml << EOF
name: windows_admins
description: "Admins from AD"
dataNamespaces:
- wildcards:
- '*'
permissions:
- CreateTopic
- RequestTopicCreation
- DropTopic
- ConfigureTopic
- QueryTopic
- ShowTopic
- ViewSchema
- InsertData
- DeleteData
- UpdateSchema
system: Kafka
instance: Dev
applicationPermissions:
- ViewKafkaConsumers
- ManageKafkaConsumers
- ViewConnectors
- ManageConnectors
- ViewSQLProcessors
- ManageSQLProcessors
- ViewSchemaRegistry
- ManageSchemaRegistry
- ViewTopology
- ManageTopology
adminPermissions:
- ViewDataPolicies
- ManageDataPolicies
- ViewAuditLogs
- ManageAuditLogs
- ViewUsers
- ManageUsers
- ViewAlertRules
- ManageAlertRules
- ViewKafkaSettings
- ManageKafkaSettings
- ManageConnections
- ViewLogs
- ViewKubernetes
- ViewApprovalRequest
- ManageApprovalRequest
EOF
# Add a new one
$LENSES_CLI_CMD create config.yaml
# Update an existing one
$LENSES_CLI_CMD create config.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment