Quantcast
Channel: 一言多いプログラマーの独り言
Viewing all articles
Browse latest Browse all 846

Apache CouchDBで、管理者パスワード設定

$
0
0
Apache CouchDBで、管理者パスワード設定です。


$ HOST="http://127.0.0.1:5984"
$ curl -X PUT $HOST/_config/admins/admin -d '"hogehoge"'
""

# パスワードを設定すると、今までのコマンドでは権限がないと弾かれる。
$ curl -X PUT $HOST/database
{"error":"unauthorized","reason":"You are not a server admin."}

# ユーザー名とパスワードを指定したURLで接続
$ HOST="http://admin:hogehoge@127.0.0.1:5984"
$ curl -X PUT $HOST/database
{"ok":true}
Furonを利用する場合は、画面右下のリンクから、設定できます。

Welcome to Admin Party!
Everyone is admin. Fix this



参考サイト
Security(Apache CouchDB 2.0 Documentation)

Viewing all articles
Browse latest Browse all 846

Trending Articles