Created
July 6, 2020 12:45
-
-
Save alces/ea3253efd2e5b12fadd0fcaf611ce08a to your computer and use it in GitHub Desktop.
Manipulating groups with lenses-cli
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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