From f1d4fec45e7e7ac57f9e14c4e8469902df1ef8fb Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Tue, 27 Jul 2021 11:35:41 -0400 Subject: [PATCH 1/2] Demonstrate use of `htpasswd` for bCrypt in `staticPasswords` Signed-off-by: Jesse Glick --- examples/config-dev.yaml | 2 +- examples/k8s/dex.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/config-dev.yaml b/examples/config-dev.yaml index b40ea582..35ba6ba4 100644 --- a/examples/config-dev.yaml +++ b/examples/config-dev.yaml @@ -141,7 +141,7 @@ enablePasswordDB: true # If this option isn't chosen users may be added through the gRPC API. staticPasswords: - email: "admin@example.com" - # bcrypt hash of the string "password" + # echo password | htpasswd -BinC 10 admin | cut -d: -f2 hash: "$2a$10$2b2cU8CPhOTaGrs1HRQuAueS7JTT5ZHsHSzYiFPm1leZck7Mc8T4W" username: "admin" userID: "08a8684b-db88-4b73-90a9-3cd1661f5466" diff --git a/examples/k8s/dex.yaml b/examples/k8s/dex.yaml index 8201c79e..55466fa9 100644 --- a/examples/k8s/dex.yaml +++ b/examples/k8s/dex.yaml @@ -103,7 +103,7 @@ data: enablePasswordDB: true staticPasswords: - email: "admin@example.com" - # bcrypt hash of the string "password" + # echo password | htpasswd -BinC 10 admin | cut -d: -f2 hash: "$2a$10$2b2cU8CPhOTaGrs1HRQuAueS7JTT5ZHsHSzYiFPm1leZck7Mc8T4W" username: "admin" userID: "08a8684b-db88-4b73-90a9-3cd1661f5466" From 65edeff231691b661532c1de72d92657a698238a Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Fri, 30 Jul 2021 08:28:04 -0400 Subject: [PATCH 2/2] Include explanation in comment: https://github.com/dexidp/dex/pull/2218#discussion_r679873279 Signed-off-by: Jesse Glick --- examples/config-dev.yaml | 2 +- examples/k8s/dex.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/config-dev.yaml b/examples/config-dev.yaml index 35ba6ba4..6cae823c 100644 --- a/examples/config-dev.yaml +++ b/examples/config-dev.yaml @@ -141,7 +141,7 @@ enablePasswordDB: true # If this option isn't chosen users may be added through the gRPC API. staticPasswords: - email: "admin@example.com" - # echo password | htpasswd -BinC 10 admin | cut -d: -f2 + # bcrypt hash of the string "password": $(echo password | htpasswd -BinC 10 admin | cut -d: -f2) hash: "$2a$10$2b2cU8CPhOTaGrs1HRQuAueS7JTT5ZHsHSzYiFPm1leZck7Mc8T4W" username: "admin" userID: "08a8684b-db88-4b73-90a9-3cd1661f5466" diff --git a/examples/k8s/dex.yaml b/examples/k8s/dex.yaml index 55466fa9..fc5d84c7 100644 --- a/examples/k8s/dex.yaml +++ b/examples/k8s/dex.yaml @@ -103,7 +103,7 @@ data: enablePasswordDB: true staticPasswords: - email: "admin@example.com" - # echo password | htpasswd -BinC 10 admin | cut -d: -f2 + # bcrypt hash of the string "password": $(echo password | htpasswd -BinC 10 admin | cut -d: -f2) hash: "$2a$10$2b2cU8CPhOTaGrs1HRQuAueS7JTT5ZHsHSzYiFPm1leZck7Mc8T4W" username: "admin" userID: "08a8684b-db88-4b73-90a9-3cd1661f5466"