Last active
April 11, 2017 17:32
-
-
Save tahmmee/e7c6513b18fa11e693065b73b1a746bd to your computer and use it in GitHub Desktop.
rbac with python sdk
This file contains 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
from couchbase.cluster import Cluster, ClassicAuthenticator, PasswordAuthenticator | |
host = "172.17.0.2" | |
port = 8091 | |
bucket = "default" | |
password = "password" | |
bucket_password = "" | |
endpoint = 'couchbase://{0}?select_bucket=true'.format(host ) | |
cluster = Cluster(endpoint) | |
auther = PasswordAuthenticator(bucket,password) | |
cluster.authenticate(auther) | |
cb = cluster.open_bucket(bucket) | |
cb.upsert("key", "value") | |
""" | |
requires | |
./couchbase-cli/couchbase-cli user-manage -c 172.17.0.2 -u Administrator -p password --set --rbac-username default --rbac-password password --roles admin --auth-type builtin | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment