Skip to content

Commit a758b60

Browse files
author
Carlos Gonzalez Betancort
committed
DOC-8648 Merge branch '6.5.2' into mad-hatter
* 6.5.2: DOC-8648 Update master password docs Change-Id: Id5149eda62ba34cc8eb7d315fa328274a033e474
2 parents fffeaa0 + 9433e35 commit a758b60

6 files changed

Lines changed: 926 additions & 141 deletions

docs/generated/doc/couchbase-cli/couchbase-cli-master-password.html

Lines changed: 72 additions & 85 deletions
Large diffs are not rendered by default.

docs/generated/doc/couchbase-cli/couchbase-cli-setting-master-password.html

Lines changed: 626 additions & 0 deletions
Large diffs are not rendered by default.

docs/generated/man/man1/couchbase-cli-master-password.1

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
'\" t
22
.\" Title: couchbase-cli-master-password
33
.\" Author: Couchbase
4-
.\" Generator: Asciidoctor 2.0.10
5-
.\" Date: 2021-04-22
4+
.\" Generator: Asciidoctor 1.5.8
5+
.\" Date: 2021-06-16
66
.\" Manual: Couchbase CLI Manual
77
.\" Source: Couchbase CLI 1.0.0
88
.\" Language: English
99
.\"
10-
.TH "COUCHBASE\-CLI\-MASTER\-PASSWORD" "1" "2021-04-22" "Couchbase CLI 1.0.0" "Couchbase CLI Manual"
10+
.TH "COUCHBASE\-CLI\-MASTER\-PASSWORD" "1" "2021-06-16" "Couchbase CLI 1.0.0" "Couchbase CLI Manual"
1111
.ie \n(.g .ds Aq \(aq
1212
.el .ds Aq '
1313
.ss \n[.ss] 0
@@ -31,9 +31,8 @@
3131
couchbase\-cli\-master\-password \- Sends the Couchbase master password
3232
.SH "SYNOPSIS"
3333
.sp
34-
.sp
3534
.nf
36-
\fIcouchbase\-cli master\-password\fP [\-\-new\-password <password>] [\-\-rotate\-data\-key]
35+
\fIcouchbase\-cli master\-password\fP [\-\-send\-password <password>]
3736
.fi
3837
.br
3938
.SH "DESCRIPTION"
@@ -57,23 +56,16 @@ the node that needs to be unlocked and the user running the command must be
5756
a member of the \f(CRcouchbase\fP group (or be root.)
5857
.SH "OPTIONS"
5958
.sp
60-
\-\-new\-password
59+
\-\-send\-password
6160
.RS 4
6261
Sends the master password to the server that is waiting to start up.
6362
.RE
64-
.sp
65-
\-\-rotate\-data\-key
66-
.RS 4
67-
If provided it will rotate the master password data key. This option cannot
68-
be provided together with \f(CR\-\-new\-password\fP.
69-
.RE
7063
.SH "EXAMPLES"
7164
.sp
7265
To use the Secret Management feature, the first thing you need to do is set a
73-
password on each node of the cluster. To do this, install and start Couchbase,
74-
but don\(cqt go through the setup process or initialize the cluster. Once
75-
Couchbase has started, run the following command to set the master password
76-
for your server.
66+
password on each node of the cluster. To do this, install, start and initialize
67+
Couchbase. Once Couchbase has started, run the following command to set the master
68+
password for your server.
7769
.sp
7870
.if n .RS 4
7971
.nf
@@ -82,13 +74,12 @@ $ couchbase\-cli setting\-master\-password \-c 127.0.0.1 \-u Administrator \(rs
8274
.fi
8375
.if n .RE
8476
.sp
85-
This will cause Couchbase Server to wait for the master password before
86-
starting up. When your cluster is restarted, you will notice that the server
87-
doesn’t fully come up as it is now waiting for the master password to be
88-
entered. You can do this by running the command below. The master\-password
89-
subcommand has to be run locally on the node that is waiting for the master
90-
password and as the user must have be able to read files in the \f(CRcouchbase\fP
91-
group.
77+
Once the master password is configured restart the server. Upon restarting the
78+
cluster you will notice that the server doesn\(cqt fully start. This is because it
79+
is waiting for you to enter the master password. You can do this by running the
80+
command below. The master\-password subcommand has to be run locally on the node
81+
that is waiting for the master password and as the user must have be able to
82+
read files in the \f(CRcouchbase\fP group.
9283
.sp
9384
.if n .RS 4
9485
.nf
Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
'\" t
2+
.\" Title: couchbase-cli-setting-master-password
3+
.\" Author: Couchbase
4+
.\" Generator: Asciidoctor 1.5.8
5+
.\" Date: 2021-06-15
6+
.\" Manual: Couchbase CLI Manual
7+
.\" Source: Couchbase CLI 1.0.0
8+
.\" Language: English
9+
.\"
10+
.TH "COUCHBASE\-CLI\-SETTING\-MASTER\-PASSWORD" "1" "2021-06-15" "Couchbase CLI 1.0.0" "Couchbase CLI Manual"
11+
.ie \n(.g .ds Aq \(aq
12+
.el .ds Aq '
13+
.ss \n[.ss] 0
14+
.nh
15+
.ad l
16+
.de URL
17+
\fI\\$2\fP <\\$1>\\$3
18+
..
19+
.als MTO URL
20+
.if \n[.g] \{\
21+
. mso www.tmac
22+
. am URL
23+
. ad l
24+
. .
25+
. am MTO
26+
. ad l
27+
. .
28+
. LINKSTYLE blue R < >
29+
.\}
30+
.SH "NAME"
31+
couchbase\-cli\-setting\-master\-password \- Manages the Couchbase master password
32+
.SH "SYNOPSIS"
33+
.sp
34+
.nf
35+
\fIcouchbase\-cli setting\-master\-password\fP [\-\-cluster <url>] [\-\-username <user>]
36+
[\-\-password <password>] [\-\-new\-password <password>] [\-\-rotate\-password]
37+
.fi
38+
.br
39+
.SH "DESCRIPTION"
40+
.sp
41+
Couchbase Server Enterprise Edition has a "Secret Management" feature, which
42+
allows users to securely encrypt passwords and other sensitive configuration
43+
information that is stored on disk. These secrets must be stored in a secure
44+
way; and access must be controlled, to reduce the risk of accidental exposure.
45+
By using Secret Management in Couchbase Server, secrets are written to disk
46+
in encrypted format. To decrypt these secrets, Couchbase requires entry of a
47+
"master password", which is supplied by the user during server startup. This
48+
master password can be passed to the server using the couchbase\-cli
49+
master\-password command.
50+
.sp
51+
By default, the Secret Management feature is disabled. To enable the feature,
52+
you must first set the master password. Once a master password is set, the
53+
user is required to enter it when the server starts up. This can be done by
54+
setting the environment variable CB_MASTER_PASSWORD=<password> during server
55+
startup.
56+
.SH "OPTIONS"
57+
.sp
58+
\-c, \-\-cluster
59+
.RS 4
60+
Specifies the hostname of a node in the cluster. See the HOST FORMATS
61+
section for more information on specifying a hostname.
62+
.RE
63+
.sp
64+
\-u, \-\-user <username>
65+
.RS 4
66+
Specifies the username of the user executing the command. If you do not have
67+
a user account with permission to execute the command then it will fail with
68+
an unauthorized error.
69+
.RE
70+
.sp
71+
\-p, \-\-password <password>
72+
.RS 4
73+
Specifies the password of the user executing the command. If you do not have
74+
a user account with permission to execute the command then it will fail with
75+
an unauthorized error. If this argument is specified, but no password is
76+
given then the command will prompt the user for a password through
77+
non\-echoed stdin. You may also specify your password by using the
78+
environment variable CB_REST_PASSWORD.
79+
.RE
80+
.sp
81+
\-\-rotate\-data\-key
82+
.RS 4
83+
Secrets are encrypted using a data key file, which is a unique key that is
84+
stored on disk for each server. To open this file, the master password is
85+
used to generate a key which decrypts the contents of the data key file.
86+
The contents of the decrypted data key file can then be used to decrypt
87+
secrets. Some users may want to generate a new data key file periodically,
88+
to increase security. This option is used to generate a new data key file.
89+
.RE
90+
.sp
91+
\-\-new\-password
92+
.RS 4
93+
Sets a new master password for the server specified. The user may specify
94+
this password on the command line, or through non\-echoed stdin. To specify
95+
the password through non\-echoed stdin, do not provide a value for this
96+
option. The user will then be prompted to enter the password.
97+
.RE
98+
.SH "HOST FORMATS"
99+
.sp
100+
When specifying a host for the couchbase\-cli command the following formats are expected:
101+
.sp
102+
.RS 4
103+
.ie n \{\
104+
\h'-04'\(bu\h'+03'\c
105+
.\}
106+
.el \{\
107+
. sp -1
108+
. IP \(bu 2.3
109+
.\}
110+
\f(CRcouchbase://<addr>\fP
111+
.RE
112+
.sp
113+
.RS 4
114+
.ie n \{\
115+
\h'-04'\(bu\h'+03'\c
116+
.\}
117+
.el \{\
118+
. sp -1
119+
. IP \(bu 2.3
120+
.\}
121+
\f(CR<addr>:<port>\fP
122+
.RE
123+
.sp
124+
.RS 4
125+
.ie n \{\
126+
\h'-04'\(bu\h'+03'\c
127+
.\}
128+
.el \{\
129+
. sp -1
130+
. IP \(bu 2.3
131+
.\}
132+
\f(CRhttp://<addr>:<port>\fP
133+
.RE
134+
.sp
135+
It is recommended to use the couchbase://<addr> format for standard
136+
installations. The other two formats allow an option to take a port number which
137+
is needed for non\-default installations where the admin port has been set up on
138+
a port other that 8091.
139+
.SH "EXAMPLES"
140+
.sp
141+
To use the Secret Management feature, the first thing you need to do is set a
142+
password on each node of the cluster. To do this, install and start Couchbase,
143+
but don\(cqt go through the setup process or initialize the cluster. Once
144+
Couchbase has started, run the following command to set the master password
145+
for your server.
146+
.sp
147+
.if n .RS 4
148+
.nf
149+
$ couchbase\-cli setting\-master\-password \-c 127.0.0.1 \-u Administrator \(rs
150+
\-p password \-\-new\-password password
151+
.fi
152+
.if n .RE
153+
.sp
154+
Once the master password is configured restart the server. Upon restarting the
155+
cluster you will notice that the server doesn\(cqt fully start. This is because it
156+
is waiting for you to enter the master password. You can do this by running the
157+
command below. The master\-password subcommand has to be run locally on the node
158+
that is waiting for the master password.
159+
.sp
160+
.if n .RS 4
161+
.nf
162+
$ couchbase\-cli master\-password \-\-send\-password password
163+
.fi
164+
.if n .RE
165+
.sp
166+
Note you can also use the CB_MASTER_PASSWORD=<password> environmental variable
167+
to pass the password to the node during startup.
168+
.SH "ENVIRONMENT AND CONFIGURATION VARIABLES"
169+
.sp
170+
CB_REST_USERNAME
171+
.RS 4
172+
Specifies the username to use when executing the command. This environment
173+
variable allows you to specify a default argument for the \-u/\-\-username
174+
argument on the command line.
175+
.RE
176+
.sp
177+
CB_REST_PASSWORD
178+
.RS 4
179+
Specifies the password of the user executing the command. This environment
180+
variable allows you to specify a default argument for the \-p/\-\-password
181+
argument on the command line. It also allows the user to ensure that their
182+
password are not cached in their command line history.
183+
.RE
184+
.SH "SEE ALSO"
185+
.sp
186+
\fBcouchbase\-cli\-master\-password\fP(1),
187+
\fBcouchbase\-cli\-cluster\-init\fP(1),
188+
\fBcouchbase\-cli\-server\-add\fP(1)
189+
.SH "COUCHBASE\-CLI"
190+
.sp
191+
Part of the \fBcouchbase\-cli\fP(1) suite
192+
.SH "AUTHOR"
193+
.sp
194+
Couchbase

docs/modules/cli/pages/cbcli/couchbase-cli-master-password.adoc

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Sends the Couchbase master password
1212
== SYNOPSIS
1313

1414
[verse]
15-
_couchbase-cli master-password_ [--new-password <password>] [--rotate-data-key]
15+
_couchbase-cli master-password_ [--send-password <password>]
1616

1717
== DESCRIPTION
1818

@@ -36,32 +36,25 @@ a member of the `couchbase` group (or be root.)
3636

3737
== OPTIONS
3838

39-
40-
--new-password::
39+
--send-password::
4140
Sends the master password to the server that is waiting to start up.
4241

43-
--rotate-data-key::
44-
If provided it will rotate the master password data key. This option cannot
45-
be provided together with `--new-password`.
46-
4742
== EXAMPLES
4843

4944
To use the Secret Management feature, the first thing you need to do is set a
50-
password on each node of the cluster. To do this, install and start Couchbase,
51-
but don't go through the setup process or initialize the cluster. Once
52-
Couchbase has started, run the following command to set the master password
53-
for your server.
45+
password on each node of the cluster. To do this, install, start and initialize
46+
Couchbase. Once Couchbase has started, run the following command to set the master
47+
password for your server.
5448

5549
$ couchbase-cli setting-master-password -c 127.0.0.1 -u Administrator \
5650
-p password --new-password password
5751

58-
This will cause Couchbase Server to wait for the master password before
59-
starting up. When your cluster is restarted, you will notice that the server
60-
doesn’t fully come up as it is now waiting for the master password to be
61-
entered. You can do this by running the command below. The master-password
62-
subcommand has to be run locally on the node that is waiting for the master
63-
password and as the user must have be able to read files in the `couchbase`
64-
group.
52+
Once the master password is configured restart the server. Upon restarting the
53+
cluster you will notice that the server doesn't fully start. This is because it
54+
is waiting for you to enter the master password. You can do this by running the
55+
command below. The master-password subcommand has to be run locally on the node
56+
that is waiting for the master password and as the user must have be able to
57+
read files in the `couchbase` group.
6558

6659
$ couchbase-cli master-password --send-password password
6760

docs/modules/cli/pages/cbcli/couchbase-cli-setting-master-password.adoc

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ By default, the Secret Management feature is disabled. To enable the feature,
3131
you must first set the master password. Once a master password is set, the
3232
user is required to enter it when the server starts up. This can be done by
3333
setting the environment variable CB_MASTER_PASSWORD=<password> during server
34-
startup. Alternatively, you can set the environment variable
35-
CB_WAIT_FOR_MASTER_PASSWORD=true, and then enter the master password using the
36-
couchbase-cli master-password command.
34+
startup.
3735

3836
== OPTIONS
3937

@@ -66,21 +64,17 @@ for your server.
6664
$ couchbase-cli setting-master-password -c 127.0.0.1 -u Administrator \
6765
-p password --new-password password
6866

69-
Once the master password has been set, you need to set the server environment
70-
variable CB_WAIT_FOR_MASTER_PASSWORD=true. You can do this by running the
71-
command below, or by setting the variable in your .bashrc file.
72-
73-
$ export CB_WAIT_FOR_MASTER_PASSWORD=true
74-
75-
This environment variable will cause Couchbase to wait for the master password
76-
before starting up. Once it is set, you need to restart your cluster. Upon
77-
restarting the cluster you will notice that the server doesn't fully start.
78-
This is because it is waiting for you to enter the master password. You can do
79-
this by running the command below. The master-password subcommand has to be
80-
run locally on the node that is waiting for the master password.
67+
Once the master password is configured restart the server. Upon restarting the
68+
cluster you will notice that the server doesn't fully start. This is because it
69+
is waiting for you to enter the master password. You can do this by running the
70+
command below. The master-password subcommand has to be run locally on the node
71+
that is waiting for the master password.
8172

8273
$ couchbase-cli master-password --send-password password
8374

75+
Note you can also use the CB_MASTER_PASSWORD=<password> environmental variable
76+
to pass the password to the node during startup.
77+
8478
== ENVIRONMENT AND CONFIGURATION VARIABLES
8579

8680
include::{partialsdir}/cbcli/part-common-env.adoc[]

0 commit comments

Comments
 (0)