File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -251,18 +251,19 @@ If you want to apply a configuration to an existing SpiceDB cluster without down
251251 ` ` ` sh
252252 # Generate your secret (substitute your preferred method for generating a cryptographically-secure random string here)
253253 # This will be a part of the token
254- base64 < /dev/random | head -c64
254+ SECRET="$( base64 < /dev/random | head -c64)"; echo "$SECRET"
255255 # g2l2/YjC3jFg6FdV080qiqBPvCrlLuc9GcHutgHF4WhVjsg7+AvlqLmoCrJEC68t
256256
257257 # Hash that secret using sha256sum
258258 # This will go in your FGAM configuration as the token hash
259259 # NOTE: truncate the trailing spaces and "-". You just want the alphanum characters.
260- echo -n "g2l2/YjC3jFg6FdV080qiqBPvCrlLuc9GcHutgHF4WhVjsg7+AvlqLmoCrJEC68t " | sha256sum
261- # 1d619ac2f5013845c5f2df93add92fc87e88ca6c57d19a77d1b189663f1ff5b0 -
260+ HASH="$( echo -n "$SECRET " | sha256sum | cut -d" " -f1)"; echo "$HASH"
261+ # 1d619ac2f5013845c5f2df93add92fc87e88ca6c57d19a77d1b189663f1ff5b0
262262
263- # Add the prefix to create the token that you'll supply to your client
264- echo "sdbst_h256_g2l2/YjC3jFg6FdV080qiqBPvCrlLuc9GcHutgHF4WhVjsg7+AvlqLmoCrJEC68t"
265- # sdbst_h256_g2l2/YjC3jFg6FdV080qiqBPvCrlLuc9GcHutgHF4WhVjsg7+AvlqLmoCrJEC68t
263+ # Add the prefix "sdbst_h256_" to create the token that you'll supply to your client
264+ printf "token : sdbst_h256_%s\nhash: %s\n" "$SECRET" "$HASH"
265+ # token: sdbst_h256_g2l2/YjC3jFg6FdV080qiqBPvCrlLuc9GcHutgHF4WhVjsg7+AvlqLmoCrJEC68t
266+ # hash: 1d619ac2f5013845c5f2df93add92fc87e88ca6c57d19a77d1b189663f1ff5b0
266267 ```
267268
2682692 . Prepare the FGAM configuration YAML.
You can’t perform that action at this time.
0 commit comments