私有雲版本 4.17.01 版本
安裝完成後,重設 OpenLDAP、Apigee Edge 系統管理員、Edge 機構使用者和 Cassandra 密碼。
重設 OpenLDAP 密碼
視 Edge 設定而定,OpenLDAP 可透過下列方式安裝:
- 在 Management Server 節點上安裝單一 OpenLDAP 執行個體。例如,在 2 節點、5 節點或 9 節點邊緣邊緣設定中。
- 在管理伺服器節點上安裝多個 OpenLDAP 執行個體,並設定 OpenLDAP 複製功能。例如,在 12 節點邊緣設定中。
- 將多個 OpenLDAP 執行個體安裝在其節點上,並使用 OpenLDAP 複製功能進行設定。例如,在 13 節點邊緣設定中。
重設 OpenLDAP 密碼的方式取決於您的設定。
如果是在管理伺服器中安裝的 OpenLDAP 執行個體,請執行下列指令:
- 在管理伺服器節點中,執行下列指令來建立新的 OpenLDAP 密碼:
> /opt/apigee/apigee-service/bin/apigee-service apigee-openldap change-ldap-password -ooldPword -n newPword - 請執行下列指令來儲存新伺服器,以便管理伺服器存取伺服器:
> /opt/apigee/apigee-service/bin/apigee-service Edge-management-server store_ldap_credentials -p newPword
這個指令會重新啟動管理伺服器。
在 OpenLDAP 複製設定與 Open Server Server 節點安裝 OpenLDAP 資料庫中,按照上述兩個管理伺服器節點上的步驟更新密碼。
在 OpenLDAP 複製設定 (OpenLDAP 位於管理伺服器以外的節點上) 中,請務必先變更兩個 OpenLDAP 節點上的密碼,然後在兩個管理伺服器節點上變更密碼。
重設系統管理員密碼
重設系統管理員密碼時,您必須在下列兩個地方重設密碼:
- 管理伺服器
- UI
警告:必須先重設 Edge UI,才能重設系統管理員密碼。由於您先在管理伺服器中重設密碼,短時間內 UI 仍在使用舊密碼。如果 UI 使用舊密碼發出超過三個呼叫,OpenLDAP 伺服器會鎖定系統管理員帳戶 3 分鐘。
如何重設系統管理員密碼:
- 在 UI 節點上停止 Edge UI:
> /opt/apigee/apigee-service/bin/apigee-service Edge-ui stop - 在管理伺服器中,執行下列指令來重設密碼:
> /opt/apigee/apigee-service/bin/apigee-service Edge-management-server change_sysadmin_password -o currentPW -n newPW - 編輯您用於安裝 Edge UI 的靜音設定檔,以便設定下列屬性:
APIGEE_ADMINPW=newPW
SMTPHOST=smtp.gmail.com
SMTPPORT=465
SMTPUSER=foo@gmail.com
SMTPPASSWORD=bar
SMTPSSL=y
請注意,在傳送新密碼時,您必須在郵件中納入 SMTP 屬性,因此您必須在郵件中納入 SMTP 屬性。 - 使用 apigee-setup 公用程式,透過設定檔重設 Edge UI 的密碼:
> /opt/apigee/apigee-setup/bin/setup.sh -p ui -f configFile - (僅在 UI 啟用傳輸層安全標準 (TLS) 時) 如「為管理 UI 設定傳輸層安全標準 (TLS)」所述,在 Edge UI 中重新啟用傳輸層安全標準 (TLS)。
在含有多個管理伺服器的 OpenLDAP 複製環境中,重設其中一個管理伺服器的密碼會自動更新另一個管理伺服器。不過,您必須個別更新所有 Edge UI 節點。
重設機構使用者密碼
如要重設機構使用者的密碼,請使用 apigee-servce 公用程式叫用 apigee-setup:
/opt/apigee/apigee-service/bin/apigee-service apigee-setup reset_user_password [-h] [-u USER_EMAIL] [-p USER_PWD] [-a ADMIN_EMAIL] [-P APIGEE_ADMINPW] [-f configFile]
例如:
> /opt/apigee/apigee-service/bin/apigee-service apigee-setup reset_user_password -u user@myCo.com -p foo12345 -a admin@myCo.com -P adminPword
以下是可以與「-f」選項搭配使用的設定檔範例:
USER_NAME= user@myCo.com USER_PWD= "foo12345" APIGEE_ADMINPW= adminPword
您也可以使用 Update user API 變更使用者密碼。
Sys 管理員和機構使用者密碼規則
您可以使用這個部分為 API 管理使用者強制執行所需長度的密碼長度和強度。這些設定會使用一系列預先設定的 (專屬編號編號) 規則運算式來檢查密碼內容 (例如大寫、小寫、數字和特殊字元)。將這些設定寫入 /opt/apigee/customer/application/management-server.properties 檔案。如果該檔案不存在,請建立該檔案。
編輯 management-server.properties 後,重新啟動管理伺服器:
> /opt/apigee/apigee-service/bin/apigee-service edge-management-server restart
然後,您可以使用不同規則運算式組合將密碼強度評分分組。舉例來說,您可以決定密碼強度至少為一個大小寫字母,密碼強度為 3,但如果密碼至少含有一個小寫字母,數字就會增加「4」。
資源 |
Description |
---|---|
conf_security_password.validation.minimum. conf_security_password.validation.default.rating=2 conf_security_password.validation.minimum. |
可用於判斷有效密碼的整體特性。預設的密碼強度下限 (如下表所述) 為 3 個。 請注意,password.validation.default.rating=2 低於最低門檻,表示如果密碼超出您設定的規則範圍,則密碼會被評分為 2,因此無效 (低於 3 分)。 |
以下是用來識別密碼特性的規則運算式。請注意,每項號碼都會加上編號。例如「password.validation.regex.5=...」是運算式 5。您會在檔案後續部分使用這些數字設定不同組合,藉此決定整體密碼強度。 |
|
conf_security_password.validation.regex.1=^(.)\\1+$ |
1 – 所有字元重複 |
conf_security_password.validation.regex.2=^.*[a-z]+.*$ |
2 – 至少一個小寫字母 |
conf_security_password.validation.regex.3=^.*[A-Z]+.*$ |
3 – 至少要輸入一個大寫字母 |
conf_security_password.validation.regex.4=^.*[0-9]+.*$ |
4 – 至少一位數字 |
conf_security_password.validation.regex.5=^.*[^a-zA-z0-9]+.*$ |
5 – 至少一個特殊字元 (不含底線 _) |
conf_security_password.validation.regex.6=^.*[_]+.*$ |
6 – 至少一個底線 |
conf_security_password.validation.regex.7=^.*[a-z]{2,}.*$ |
7 – 超過 1 個小寫字母 |
conf_security_password.validation.regex.8=^.*[A-Z]{2,}.*$ |
8 – 多個大寫字母 |
conf_security_password.validation.regex.9=^.*[0-9]{2,}.*$ |
9 – 超過一個數字 |
conf_security_password.validation.regex.10=^.*[^a-zA-z0-9]{2,}。*$ |
10 - 包含多個特殊字元 (不含底線) |
conf_security_password.validation.regex.11=^.*[_]{2,}.*$ |
11 – 超過一個底線 |
下列規則會根據密碼內容決定密碼強度。 每項規則都包含前一節的一或多個規則運算式,並為其指派數值強度。系統會將密碼的數字強度與 conf_security_password.validation.minimum.rating.required 進行比較,判斷密碼是否有效。 |
|
conf_security_password.validation.rule.1=1,AND,0 conf_security_password.validation.rule.2=2,3,4,AND,4 conf_security_password.validation.rule.3=2,9,AND,4 conf_security_password.validation.rule.4=3,9,AND,4 conf_security_password.validation.rule.5=5,6,OR,4 conf_security_password.validation.rule.6=3,2,AND,3 conf_security_password.validation.rule.7=2,9,AND,3 conf_security_password.validation.rule.8=3,9,AND,3 |
每項規則都會加上編號。舉例來說,「password.validation.rule.3=...」是規則編號 3。 每項規則都會使用下列格式 (等號的右側): <regex-index-list>、<AND|OR>、<rating> 「regex-index-list」是規則運算式清單 (依據上一節的數值) 以及 AND|OR 運算子 (意即考慮所有或列出的運算式)。 rating 是指派給各項規則的數字強度評分, 舉例來說,規則 5 表示密碼中至少有一個特殊字元。使用 password.validation.minimum. |
conf_security_rbac.password.validation.enabled=true |
啟用單一登入 (SSO) 服務時,將角色型存取權控管設定驗證為 false。預設值為 true。 |
重設 Cassandra 密碼
Cassandra 預設停用驗證功能。啟用驗證功能後,系統會使用名為「cassandra」且有「cassandra」密碼的預先定義使用者。你可以使用這個帳戶、設定這個帳戶的其他密碼,或建立新的 Cassandra 使用者。使用 Cassandra CREATE/ALTER/DROP USER 陳述式來新增、移除及修改使用者。
如要瞭解如何啟用 Cassandra 驗證,請參閱「啟用 Cassandra 驗證」。
如要重設 Cassandra 密碼,您必須:
- 在任一 Cassandra 節點上設定密碼,即可向環狀中的所有 Cassandra 節點廣播
- 以新密碼更新每個節點上的管理伺服器、訊息處理器、路由器、Qpid 伺服器、Postgres 伺服器和 BaaS 堆疊
詳情請參閱 http://www.datastax.com/documentation/cql/3.0/cql/cql_reference/cqlCommandsTOC.html。
如何重設 Cassandra 密碼:
- 使用 cqlsh 工具和預設憑證登入任何 Cassandra 節點。你只需變更一個 Cassandra 節點的密碼,即可向環狀中的所有 Cassandra 節點廣播:
> /opt/apigee/apigee-cassandra/bin/cqlsh cassIP 9042 -u cassandra -p cassandra
地點:- cassIP 是 Cassandra 節點的 IP 位址。
- 9042 是 Cassandra 通訊埠。
- 預設使用者是 cassandra。
- 預設密碼為 cassandra。如果您先前變更了密碼,請使用目前的密碼。
- 執行下列指令,做為 cqlsh> 提示,藉此更新密碼:
cqlsh> ALTER USER cassandra WITH PASSWORD 「NEW_PASSWORD」;
如果新密碼含有單引號字元,請在前面加上一個半形字元。 - 退出 cqlsh 工具:
cqlsh>exit - 在「管理伺服器」節點中執行下列指令:
> /opt/apigee-apigee-service/bin/apigee-service Edge-management-server store_cassandra_credentials -u CASS_Username -p CASS_PASSWORD
可攜碼檔案 - 重複步驟 4:
- 所有訊息處理器
- 所有路由器
- 所有 Qpid 伺服器 (edge-qpid-server)
- Postgres 伺服器 (edge-postgres-server)
- 在 4.16.05.04 以上版本中的 BaaS 堆疊節點中:
- 執行下列指令來產生加密密碼:
> /opt/apigee/apigee-service/bin/apigee-service baas-usergrid secure_password
這個指令會提示您使用純文字密碼,並以下列格式傳回加密的密碼:
SECURE:ae1b6dedbf6b26a39c5853593599559915c935995599159915a9915c9359915a99759915a925c99559919a19c19c12cc85559915a927c9359915a927c9359915a927c9359915a99159919a19219915a9210339915193191193153991111515 - 在 /opt/apigee/customer/application/usergrid.properties 中設定下列權杖。如果該檔案不存在,請建立該檔案:
usergrid-deployment_cassandra.username=cassandra
usergrid-deployment_cassandra.password=SECURE:ae1b6dedbf6b26aaab8bee815a910737c1c15b55f3505c239
1.c44.c9.c94.c9.
如果您變更了使用者名稱,請視情況設定 usergrid-deployment_cassandra.username 的值。
請務必在密碼中加入「SECURE:」前置字串。 否則 BaaS 堆疊會將這個值解讀為未加密。
注意:每個 BaaS 堆疊節點都有用來加密密碼的專屬金鑰。因此,您必須個別為每個 BaaS 堆疊節點產生加密值。 - 將 usergrid.properties 檔案的擁有權變更為「Apigee」使用者:
> chown Apigee:Apigee /opt/apigee/customer/application/usergrid.properties - 設定 Stack 節點:
> /opt/apigee/apigee-service/bin/apigee-service baas-usergrid 設定 - 重新啟動 BaaS 堆疊:
> /opt/apigee/apigee-service/bin/apigee-service baas-usergrid 重新啟動 - 重複所有 BaaS 堆疊 Nox 的步驟。
- 執行下列指令來產生加密密碼:
Cassandra 密碼現已變更。
正在重設 PostgreSQL 密碼
根據預設,PostgreSQL 資料庫定義了兩個使用者:「postgres」和「Apigee」。每位使用者都有預設密碼「postgres」。如要變更預設密碼,請使用下列程序。
變更所有 Postgres 主要節點的密碼。如果您在主要執行個體/待命模式下設定了兩個 Postgres 伺服器,則只需變更主節點的密碼。詳情請參閱「為 Postgres 設定主要備用資源」。
- 在主要 Postgres 節點上,將目錄變更為 /opt/apigee/apigee-postgresql/pgsql/bin。
- 設定 PostgreSQL「postgres」使用者密碼:
- 使用下列指令登入 PostgreSQL 資料庫:
> psql -h localhost -d apigee -U postgres - 出現提示時,請將「postgres」使用者密碼輸入「postgres」。
- 在 PostgreSQL 命令提示字元中,輸入下列指令,變更預設密碼:
apigee=> ALTER USER postgres WITH PASSWORD 'apigee1234'; - 使用下列指令退出 PostgreSQL 資料庫:
apigee=> \q
- 使用下列指令登入 PostgreSQL 資料庫:
- 設定 PostgreSQL「Apigee」使用者密碼:
- 使用下列指令登入 PostgreSQL 資料庫:
> psql -h localhost -d Apigee -U Apigee - 系統顯示提示訊息時,請在「Apigee」的使用者密碼中輸入「postgres」。
- 在 PostgreSQL 命令提示字元中,輸入下列指令,變更預設密碼:
apigee=> ALTER USER apigee WITH PASSWORD 'apigee1234'; - 使用下列指令退出 PostgreSQL 資料庫:
apigee=> \q
- 使用下列指令登入 PostgreSQL 資料庫:
- 設定 APIGEE_HOME:
> 匯出 APIGEE_HOME=/opt/apigee/edge-postgres-server - 加密新密碼:
> sh /opt/apigee/edge-postgres-server/utils/scripts/utilities/passwordgen.sh apigee1234
這項指令會傳回加密密碼,如下所示。加密密碼是在「:」字元後方,且不包含「:」字元。
加密字串 :WheaR8U4OeMEM11erxA3Cw== - 為「postgres」和「Apigee」使用者更新新的已加密密碼管理管理節點。
- 在管理伺服器上,將目錄變更為 /opt/apigee/customer/application。
- 編輯 management-server.properties 檔案,設定下列屬性。如果這個檔案不存在,請建立這個檔案:
注意:部分屬性採用已加密的「postgres」使用者密碼,某些屬性則會採用加密的「Apigee」使用者密碼。- conf_pg-agent_password=newEncryptedPasswordForPostgresUser
- conf_pg-ingest_password=newEncryptedPasswordForPostgresUser
- conf_query-service_pgDefaultPwd=newEncryptedPasswordForApigee 使用者
- conf_query-service_dwDefaultPwd=newEncryptedPasswordForApigee 使用者
- conf_analytics_aries.pg.password=newEncryptedPasswordForPostgresUser
- 確認檔案為「Apigee」使用者:
> chown apigee:apigee management-server.properties
- 使用新的加密密碼更新所有 Postgres Server 和 Qpid Server 節點。
- 在 Postgres 伺服器或 Qpid Server 節點上,將目錄變更為 /opt/apigee/customer/application。
- 編輯下列檔案。如果這些檔案不存在,請建立以下檔案:
- postgres-server.properties
- qpid-server.properties
- 在檔案中新增下列屬性:
注意:所有這類屬性都會採用加密的「postgres」使用者密碼。- conf_pg-agent_password=newEncryptedPasswordForPostgresUser
- conf_pg-ingest_password=newEncryptedPasswordForPostgresUser
- conf_query-service_pgDefaultPwd=newEncryptedPasswordForPostgresUser
- conf_query-service_dwDefaultPwd=newEncryptedPasswordForPostgresUser
- conf_analytics_aries.pg.password=newEncryptedPasswordForPostgresUser
- 確認檔案為「Apigee」使用者:
> chown apigee:apigee postgres-server.properties
> chown Apigee:apigee qpid-server.properties
- 請按照下列順序重新啟動下列元件:
- PostgreSQL 資料庫:
> /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql 重新啟動 - Qpid 伺服器:
> /opt/apigee/apigee-service/bin/apigee-service Edge-qpid-server 重新啟動 - Postgres 伺服器:
> /opt/apigee/apigee-service/bin/apigee-service Edge-postgres-server 重新啟動 - 管理伺服器:
> /opt/apigee/apigee-service/bin/apigee-service Edge-management-server 重新啟動
- PostgreSQL 資料庫: