git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/gitlab: Add support for storing secrets in files

Add support for storing secrets in files outside the nix store, since files in the nix store are world-readable and secrets therefore can't be stored safely there. The old string options are kept, since they can potentially be handy for testing purposes, but their descriptions now state that they shouldn't be used in production. The manual section is updated to use the file options rather than the string options and the tests now test both.

commitcbdf94c0f3ff3edba7452f30c3185e4a5b7965f6 authortalyz <kim.lindberger@gmail.com> dateWed 31 Jul 2019, 18:09 (7 years ago) parent7648b4f
3 files changed+159−124
nixos/modules/services/misc/gitlab.nix+137−48 nixos/modules/services/misc/gitlab.xml+16−40 nixos/tests/gitlab.nix+6−36
nixos/modules/services/misc/gitlab.nix+137−48
@@ -19,7 +19,6 @@ let
1919 adapter = "postgresql";
2020 database = cfg.databaseName;
2121 host = cfg.databaseHost;
22− password = cfg.databasePassword;
2322 username = cfg.databaseUsername;
2423 encoding = "utf8";
2524 pool = cfg.databasePool;
@@ -66,13 +65,6 @@ let
6665
6766 redisConfig.production.url = "redis://localhost:6379/";
6867
69− secretsConfig.production = {
70− secret_key_base = cfg.secrets.secret;
71− otp_key_base = cfg.secrets.otp;
72− db_key_base = cfg.secrets.db;
73− openid_connect_signing_key = cfg.secrets.jws;
74− };
75−
7668 gitlabConfig = {
7769 # These are the default settings from config/gitlab.example.yml
7870 production = flip recursiveUpdate cfg.extraConfig {
@@ -180,7 +172,7 @@ let
180172 address: "${cfg.smtp.address}",
181173 port: ${toString cfg.smtp.port},
182174 ${optionalString (cfg.smtp.username != null) ''user_name: "${cfg.smtp.username}",''}
183− ${optionalString (cfg.smtp.password != null) ''password: "${cfg.smtp.password}",''}
175+ ${optionalString (cfg.smtp.passwordFile != null) ''password: "@smtpPassword@",''}
184176 domain: "${cfg.smtp.domain}",
185177 ${optionalString (cfg.smtp.authentication != null) "authentication: :${cfg.smtp.authentication},"}
186178 enable_starttls_auto: ${toString cfg.smtp.enableStartTLSAuto},
@@ -249,9 +241,15 @@ in {
249241 description = "Gitlab database hostname.";
250242 };
251243
252− databasePassword = mkOption {
253− type = types.str;
254− description = "Gitlab database user password.";
244+ databasePasswordFile = mkOption {
245+ type = with types; nullOr path;
246+ default = null;
247+ description = ''
248+ File containing the Gitlab database user password.
249+
250+ This should be a string, not a nix path, since nix paths are
251+ copied into the world-readable nix store.
252+ '';
255253 };
256254
257255 databaseName = mkOption {
@@ -339,10 +337,15 @@ in {
339337 '';
340338 };
341339
342− initialRootPassword = mkOption {
343− type = types.str;
340+ initialRootPasswordFile = mkOption {
341+ type = with types; nullOr path;
342+ default = null;
344343 description = ''
345− Initial password of the root account if this is a new install.
344+ File containing the initial password of the root account if
345+ this is a new install.
346+
347+ This should be a string, not a nix path, since nix paths are
348+ copied into the world-readable nix store.
346349 '';
347350 };
348351
@@ -366,15 +369,20 @@ in {
366369 };
367370
368371 username = mkOption {
369− type = types.nullOr types.str;
372+ type = with types; nullOr str;
370373 default = null;
371374 description = "Username of the SMTP server for Gitlab.";
372375 };
373376
374− password = mkOption {
375− type = types.nullOr types.str;
377+ passwordFile = mkOption {
378+ type = types.nullOr types.path;
376379 default = null;
377− description = "Password of the SMTP server for Gitlab.";
380+ description = ''
381+ File containing the password of the SMTP server for Gitlab.
382+
383+ This should be a string, not a nix path, since nix paths
384+ are copied into the world-readable nix store.
385+ '';
378386 };
379387
380388 domain = mkOption {
@@ -384,7 +392,7 @@ in {
384392 };
385393
386394 authentication = mkOption {
387− type = types.nullOr types.str;
395+ type = with types; nullOr str;
388396 default = null;
389397 description = "Authentitcation type to use, see http://api.rubyonrails.org/classes/ActionMailer/Base.html";
390398 };
@@ -402,52 +410,69 @@ in {
402410 };
403411 };
404412
405− secrets.secret = mkOption {
406− type = types.str;
413+ secrets.secretFile = mkOption {
414+ type = with types; nullOr path;
415+ default = null;
407416 description = ''
408− The secret is used to encrypt variables in the DB. If
409− you change or lose this key you will be unable to access variables
410− stored in database.
417+ A file containing the secret used to encrypt variables in
418+ the DB. If you change or lose this key you will be unable to
419+ access variables stored in database.
411420
412421 Make sure the secret is at least 30 characters and all random,
413422 no regular words or you'll be exposed to dictionary attacks.
423+
424+ This should be a string, not a nix path, since nix paths are
425+ copied into the world-readable nix store.
414426 '';
415427 };
416428
417− secrets.db = mkOption {
418− type = types.str;
429+ secrets.dbFile = mkOption {
430+ type = with types; nullOr path;
431+ default = null;
419432 description = ''
420− The secret is used to encrypt variables in the DB. If
421− you change or lose this key you will be unable to access variables
422− stored in database.
433+ A file containing the secret used to encrypt variables in
434+ the DB. If you change or lose this key you will be unable to
435+ access variables stored in database.
423436
424437 Make sure the secret is at least 30 characters and all random,
425438 no regular words or you'll be exposed to dictionary attacks.
439+
440+ This should be a string, not a nix path, since nix paths are
441+ copied into the world-readable nix store.
426442 '';
427443 };
428444
429− secrets.otp = mkOption {
430− type = types.str;
445+ secrets.otpFile = mkOption {
446+ type = with types; nullOr path;
447+ default = null;
431448 description = ''
432− The secret is used to encrypt secrets for OTP tokens. If
433− you change or lose this key, users which have 2FA enabled for login
434− won't be able to login anymore.
449+ A file containing the secret used to encrypt secrets for OTP
450+ tokens. If you change or lose this key, users which have 2FA
451+ enabled for login won't be able to login anymore.
435452
436453 Make sure the secret is at least 30 characters and all random,
437454 no regular words or you'll be exposed to dictionary attacks.
455+
456+ This should be a string, not a nix path, since nix paths are
457+ copied into the world-readable nix store.
438458 '';
439459 };
440460
441− secrets.jws = mkOption {
442− type = types.str;
461+ secrets.jwsFile = mkOption {
462+ type = with types; nullOr path;
463+ default = null;
443464 description = ''
444− The secret is used to encrypt session keys. If you change or lose
445− this key, users will be disconnected.
465+ A file containing the secret used to encrypt session
466+ keys. If you change or lose this key, users will be
467+ disconnected.
446468
447469 Make sure the secret is an RSA private key in PEM format. You can
448470 generate one with
449471
450472 openssl genrsa 2048
473+
474+ This should be a string, not a nix path, since nix paths are
475+ copied into the world-readable nix store.
451476 '';
452477 };
453478
@@ -471,6 +496,33 @@ in {
471496
472497 config = mkIf cfg.enable {
473498
499+ assertions = [
500+ {
501+ assertion = cfg.initialRootPasswordFile != null;
502+ message = "services.gitlab.initialRootPasswordFile must be set!";
503+ }
504+ {
505+ assertion = cfg.databasePasswordFile != null;
506+ message = "services.gitlab.databasePasswordFile must be set!";
507+ }
508+ {
509+ assertion = cfg.secrets.secretFile != null;
510+ message = "services.gitlab.secrets.secretFile must be set!";
511+ }
512+ {
513+ assertion = cfg.secrets.dbFile != null;
514+ message = "services.gitlab.secrets.dbFile must be set!";
515+ }
516+ {
517+ assertion = cfg.secrets.otpFile != null;
518+ message = "services.gitlab.secrets.otpFile must be set!";
519+ }
520+ {
521+ assertion = cfg.secrets.jwsFile != null;
522+ message = "services.gitlab.secrets.jwsFile must be set!";
523+ }
524+ ];
525+
474526 environment.systemPackages = [ pkgs.git gitlab-rake gitlab-rails cfg.packages.gitlab-shell ];
475527
476528 # Redis is required for the sidekiq queue runner.
@@ -529,13 +581,9 @@ in {
529581 "L+ /run/gitlab/shell-config.yml - - - - ${pkgs.writeText "config.yml" (builtins.toJSON gitlabShellConfig)}"
530582
531583 "L+ ${cfg.statePath}/config/gitlab.yml - - - - ${pkgs.writeText "gitlab.yml" (builtins.toJSON gitlabConfig)}"
532− "L+ ${cfg.statePath}/config/database.yml - - - - ${pkgs.writeText "database.yml" (builtins.toJSON databaseConfig)}"
533− "L+ ${cfg.statePath}/config/secrets.yml - - - - ${pkgs.writeText "secrets.yml" (builtins.toJSON secretsConfig)}"
534584 "L+ ${cfg.statePath}/config/unicorn.rb - - - - ${./defaultUnicornConfig.rb}"
535−
536585 "L+ ${cfg.statePath}/config/initializers/extra-gitlab.rb - - - - ${extraGitlabRb}"
537− ] ++ optional cfg.smtp.enable
538− "L+ ${cfg.statePath}/config/initializers/smtp_settings.rb - - - - ${smtpSettings}" ;
586+ ];
539587
540588 systemd.services.gitlab-sidekiq = {
541589 after = [ "network.target" "redis.service" "gitlab.service" ];
@@ -632,13 +680,53 @@ in {
632680 ${pkgs.sudo}/bin/sudo -u ${cfg.user} cp -rf --no-preserve=mode ${cfg.packages.gitlab}/share/gitlab/config.dist/* ${cfg.statePath}/config
633681 ${pkgs.sudo}/bin/sudo -u ${cfg.user} cp -rf --no-preserve=mode ${cfg.packages.gitlab}/share/gitlab/db/* ${cfg.statePath}/db
634682
635− ${pkgs.openssl}/bin/openssl rand -hex 32 > ${cfg.statePath}/gitlab_shell_secret
636−
637683 ${pkgs.sudo}/bin/sudo -u ${cfg.user} ${cfg.packages.gitlab-shell}/bin/install
638684
685+ ${optionalString cfg.smtp.enable ''
686+ install -o ${cfg.user} -g ${cfg.group} -m u=rw ${smtpSettings} ${cfg.statePath}/config/initializers/smtp_settings.rb
687+ ${optionalString (cfg.smtp.passwordFile != null) ''
688+ smtp_password=$(<'${cfg.smtp.passwordFile}')
689+ ${pkgs.replace}/bin/replace-literal -e '@smtpPassword@' "$smtp_password" '${cfg.statePath}/config/initializers/smtp_settings.rb'
690+ ''}
691+ ''}
692+
693+ (
694+ umask u=rwx,g=,o=
695+
696+ ${pkgs.openssl}/bin/openssl rand -hex 32 > ${cfg.statePath}/gitlab_shell_secret
697+
698+ if [[ -h '${cfg.statePath}/config/secrets.yml' ]]; then
699+ rm '${cfg.statePath}/config/secrets.yml'
700+ fi
701+
702+ export secret="$(<'${cfg.secrets.secretFile}')"
703+ export db="$(<'${cfg.secrets.dbFile}')"
704+ export otp="$(<'${cfg.secrets.otpFile}')"
705+ export jws="$(<'${cfg.secrets.jwsFile}')"
706+ ${pkgs.jq}/bin/jq -n '{production: {secret_key_base: $ENV.secret,
707+ otp_key_base: $ENV.db,
708+ db_key_base: $ENV.otp,
709+ openid_connect_signing_key: $ENV.jws}}' \
710+ > '${cfg.statePath}/config/secrets.yml'
711+
712+ chown ${cfg.user}:${cfg.group} '${cfg.statePath}/config/secrets.yml' '${cfg.statePath}/gitlab_shell_secret'
713+ )
714+
715+ export db_password="$(<'${cfg.databasePasswordFile}')"
716+
717+ if [[ -z "$db_password" ]]; then
718+ >&2 echo "Database password was an empty string!"
719+ exit 1
720+ fi
721+
722+ ${pkgs.jq}/bin/jq <${pkgs.writeText "database.yml" (builtins.toJSON databaseConfig)} \
723+ '.production.password = $ENV.db_password' \
724+ >'${cfg.statePath}/config/database.yml'
725+ chown ${cfg.user}:${cfg.group} '${cfg.statePath}/config/database.yml'
726+
639727 if ! test -e "${cfg.statePath}/db-created"; then
640728 if [ "${cfg.databaseHost}" = "127.0.0.1" ]; then
641− ${pkgs.sudo}/bin/sudo -u ${pgSuperUser} psql postgres -c "CREATE ROLE ${cfg.databaseUsername} WITH LOGIN NOCREATEDB NOCREATEROLE ENCRYPTED PASSWORD '${cfg.databasePassword}'"
729+ ${pkgs.sudo}/bin/sudo -u ${pgSuperUser} psql postgres -c "CREATE ROLE ${cfg.databaseUsername} WITH LOGIN NOCREATEDB NOCREATEROLE ENCRYPTED PASSWORD '$db_password'"
642730 ${pkgs.sudo}/bin/sudo -u ${pgSuperUser} ${config.services.postgresql.package}/bin/createdb --owner ${cfg.databaseUsername} ${cfg.databaseName}
643731
644732 # enable required pg_trgm extension for gitlab
@@ -654,8 +742,9 @@ in {
654742 ${pkgs.sudo}/bin/sudo -u ${cfg.user} -H ${gitlab-rake}/bin/gitlab-rake db:migrate
655743
656744 if ! test -e "${cfg.statePath}/db-seeded"; then
745+ initial_root_password="$(<'${cfg.initialRootPasswordFile}')"
657746 ${pkgs.sudo}/bin/sudo -u ${cfg.user} ${gitlab-rake}/bin/gitlab-rake db:seed_fu \
658− GITLAB_ROOT_PASSWORD='${cfg.initialRootPassword}' GITLAB_ROOT_EMAIL='${cfg.initialRootEmail}'
747+ GITLAB_ROOT_PASSWORD="$initial_root_password" GITLAB_ROOT_EMAIL='${cfg.initialRootEmail}'
659748 ${pkgs.sudo}/bin/sudo -u ${cfg.user} touch "${cfg.statePath}/db-seeded"
660749 fi
661750
nixos/modules/services/misc/gitlab.xml+16−40
@@ -54,8 +54,8 @@
5454<programlisting>
5555services.gitlab = {
5656 <link linkend="opt-services.gitlab.enable">enable</link> = true;
57− <link linkend="opt-services.gitlab.databasePassword">databasePassword</link> = "eXaMpl3";
58− <link linkend="opt-services.gitlab.initialRootPassword">initialRootPassword</link> = "UseNixOS!";
57+ <link linkend="opt-services.gitlab.databasePasswordFile">databasePasswordFile</link> = "/var/keys/gitlab/db_password";
58+ <link linkend="opt-services.gitlab.initialRootPasswordFile">initialRootPasswordFile</link> = "/var/keys/gitlab/root_password";
5959 <link linkend="opt-services.gitlab.https">https</link> = true;
6060 <link linkend="opt-services.gitlab.host">host</link> = "git.example.com";
6161 <link linkend="opt-services.gitlab.port">port</link> = 443;
@@ -67,38 +67,10 @@ services.gitlab = {
6767 <link linkend="opt-services.gitlab.smtp.port">port</link> = 25;
6868 };
6969 secrets = {
70− <link linkend="opt-services.gitlab.secrets.db">db</link> = "uPgq1gtwwHiatiuE0YHqbGa5lEIXH7fMsvuTNgdzJi8P0Dg12gibTzBQbq5LT7PNzcc3BP9P1snHVnduqtGF43PgrQtU7XL93ts6gqe9CBNhjtaqUwutQUDkygP5NrV6";
71− <link linkend="opt-services.gitlab.secrets.secret">secret</link> = "devzJ0Tz0POiDBlrpWmcsjjrLaltyiAdS8TtgT9YNBOoUcDsfppiY3IXZjMVtKgXrFImIennFGOpPN8IkP8ATXpRgDD5rxVnKuTTwYQaci2NtaV1XxOQGjdIE50VGsR3";
72− <link linkend="opt-services.gitlab.secrets.otp">otp</link> = "e1GATJVuS2sUh7jxiPzZPre4qtzGGaS22FR50Xs1TerRVdgI3CBVUi5XYtQ38W4xFeS4mDqi5cQjExE838iViSzCdcG19XSL6qNsfokQP9JugwiftmhmCadtsnHErBMI";
73− <link linkend="opt-services.gitlab.secrets.jws">jws</link> = ''
74− -----BEGIN RSA PRIVATE KEY-----
75− MIIEpAIBAAKCAQEArrtx4oHKwXoqUbMNqnHgAklnnuDon3XG5LJB35yPsXKv/8GK
76− ke92wkI+s1Xkvsp8tg9BIY/7c6YK4SR07EWL+dB5qwctsWR2Q8z+/BKmTx9D99pm
77− hnsjuNIXTF7BXrx3RX6BxZpH5Vzzh9nCwWKT/JCFqtwH7afNGGL7aMf+hdaiUg/Q
78− SD05yRObioiO4iXDolsJOhrnbZvlzVHl1ZYxFJv0H6/Snc0BBA9Fl/3uj6ANpbjP
79− eXF1SnJCqT87bj46r5NdVauzaRxAsIfqHroHK4UZ98X5LjGQFGvSqTvyjPBS4I1i
80− s7VJU28ObuutHxIxSlH0ibn4HZqWmKWlTS652wIDAQABAoIBAGtPcUTTw2sJlR3x
81− 4k2wfAvLexkHNbZhBdKEa5JiO5mWPuLKwUiZEY2CU7Gd6csG3oqNWcm7/IjtC7dz
82− xV8p4yp8T4yq7vQIJ93B80NqTLtBD2QTvG2RCMJEPMzJUObWxkVmyVpLQyZo7KOd
83− KE/OM+aj94OUeEYLjRkSCScz1Gvq/qFG/nAy7KPCmN9JDHuhX26WHo2Rr1OnPNT/
84− 7diph0bB9F3b8gjjNTqXDrpdAqVOgR/PsjEBz6DMY+bdyMIn87q2yfmMexxRofN6
85− LulpzSaa6Yup8N8H6PzVO6KAkQuf1aQRj0sMwGk1IZEnj6I0KbuHIZkw21Nc6sf2
86− ESFySDECgYEA1PnCNn5tmLnwe62Ttmrzl20zIS3Me1gUVJ1NTfr6+ai0I9iMYU21
87− 5czuAjJPm9JKQF2vY8UAaCj2ZoObtHa/anb3xsCd8NXoM3iJq5JDoXI1ldz3Y+ad
88− U/bZUg1DLRvAniTuXmw9iOTwTwPxlDIGq5k+wG2Xmi1lk7zH8ezr9BMCgYEA0gfk
89− EhgcmPH8Z5cU3YYwOdt6HSJOM0OyN4k/5gnkv+HYVoJTj02gkrJmLr+mi1ugKj46
90− 7huYO9TVnrKP21tmbaSv1dp5hS3letVRIxSloEtVGXmmdvJvBRzDWos+G+KcvADi
91− fFCz6w8v9NmO40CB7y/3SxTmSiSxDQeoi9LhDBkCgYEAsPgMWm25sfOnkY2NNUIv
92− wT8bAlHlHQT2d8zx5H9NttBpR3P0ShJhuF8N0sNthSQ7ULrIN5YGHYcUH+DyLAWU
93− TuomP3/kfa+xL7vUYb269tdJEYs4AkoppxBySoz8qenqpz422D0G8M6TpIS5Y5Qi
94− GMrQ6uLl21YnlpiCaFOfSQMCgYEAmZxj1kgEQmhZrnn1LL/D7czz1vMMNrpAUhXz
95− wg9iWmSXkU3oR1sDIceQrIhHCo2M6thwyU0tXjUft93pEQocM/zLDaGoVxtmRxxV
96− J08mg8IVD3jFoyFUyWxsBIDqgAKRl38eJsXvkO+ep3mm49Z+Ma3nM+apN3j2dQ0w
97− 3HLzXaECgYBFLMEAboVFwi5+MZjGvqtpg2PVTisfuJy2eYnPwHs+AXUgi/xRNFjI
98− YHEa7UBPb5TEPSzWImQpETi2P5ywcUYL1EbN/nqPWmjFnat8wVmJtV4sUpJhubF4
99− Vqm9LxIWc1uQ1q1HDCejRIxIN3aSH+wgRS3Kcj8kCTIoXd1aERb04g==
100− -----END RSA PRIVATE KEY-----
101− '';
70+ <link linkend="opt-services.gitlab.secrets.dbFile">dbFile</link> = "/var/keys/gitlab/db";
71+ <link linkend="opt-services.gitlab.secrets.secretFile">secretFile</link> = "/var/keys/gitlab/secret";
72+ <link linkend="opt-services.gitlab.secrets.otpFile">otpFile</link> = "/var/keys/gitlab/otp";
73+ <link linkend="opt-services.gitlab.secrets.jwsFile">jwsFile</link> = "/var/keys/gitlab/jws";
10274 };
10375 <link linkend="opt-services.gitlab.extraConfig">extraConfig</link> = {
10476 gitlab = {
@@ -113,12 +85,16 @@ services.gitlab = {
11385 </para>
11486
11587 <para>
116− If you're setting up a new Gitlab instance, generate new secrets. You for
117− instance use <literal>tr -dc A-Za-z0-9 &lt; /dev/urandom | head -c
118− 128</literal> to generate a new secret. Gitlab encrypts sensitive data
119− stored in the database. If you're restoring an existing Gitlab instance, you
120− must specify the secrets secret from <literal>config/secrets.yml</literal>
121− located in your Gitlab state folder.
88+ If you're setting up a new Gitlab instance, generate new
89+ secrets. You for instance use <literal>tr -dc A-Za-z0-9 &lt;
90+ /dev/urandom | head -c 128 &gt; /var/keys/gitlab/db</literal> to
91+ generate a new db secret. Make sure the files can be read by, and
92+ only by, the user specified by <link
93+ linkend="opt-services.gitlab.user">services.gitlab.user</link>. Gitlab
94+ encrypts sensitive data stored in the database. If you're restoring
95+ an existing Gitlab instance, you must specify the secrets secret
96+ from <literal>config/secrets.yml</literal> located in your Gitlab
97+ state folder.
12298 </para>
12399
124100 <para>
nixos/tests/gitlab.nix+6−36
@@ -29,44 +29,14 @@ import ./make-test.nix ({ pkgs, lib, ...} : with lib; {
2929
3030 services.gitlab = {
3131 enable = true;
32− databasePassword = "dbPassword";
33− inherit initialRootPassword;
32+ databasePasswordFile = pkgs.writeText "dbPassword" "xo0daiF4";
33+ initialRootPasswordFile = pkgs.writeText "rootPassword" initialRootPassword;
3434 smtp.enable = true;
3535 secrets = {
36− secret = "secret";
37− otp = "otpsecret";
38− db = "dbsecret";
39−
40− # nix-shell -p openssl --run "openssl genrsa 2048"
41− jws = ''
42− -----BEGIN RSA PRIVATE KEY-----
43− MIIEpAIBAAKCAQEA13/qEio76OWUtWO0WIz9lWnsTWOU8Esv4sQHDq9PCEFsLt21
44− PAXrlWhLjjWcxGfsrDwnh7YErGHYL62BMSxMdFJolaknlQK/O/V8UETDe45VoHM+
45− Znk270RfUcfYFgiihnXUZXVmL0om9TsQSk646wCcjCY9LxtxUyKNhvT7KjgYw2aX
46− z34aw7M+Js3T2p1TjZPSC82GtmtKkJEKFMi5EjprLTDE7EdcUzr9Xuw+kQ+gRm9k
47− 7FE+JQqSoprwE3Q0v2OAn3UhLMgg0gNFRnsc5l6IAshDzV+H22RPqKKlJjVjjfPY
48− 0TQSvYLVApigHbDPH0BoCXfjFfQazbbP3OUHrwIDAQABAoIBAQCMU+tkcMQaYIV5
49− qLdjgkwO467QpivyXcOM8wF1eosIYTHFQvIlZ+WEoSmyLQ8shlADyBgls01Pw1c3
50− lNAv6RzQEmmwKzpvOh61OKH+0whIiOMRXHoh2IUBQZCgfHYlwvGyhUAN4WjtGmhM
51− AG4XNTQNM5S9Xpkw97nP3Qwz+YskbbkrfqtCEVy9ro+4nhbjqPsuO3adbnkva4zR
52− cyurRhrHgHU6LPjn5NHnHH4qw2faY2oAsL8pmpkTbO5IqWDvOcbjNfjVPgVoq26O
53− bbaa1qs4nmc80qQgMjRPJef535xyf3eLsSlDvpf6O8sPrJzVR1zaqEqixpQCZDac
54− +kRiSBrhAoGBAOwHiq0PuyJh6VzBu7ybqX6+gF/wA4Jkwzx6mbfaBgurvU1aospp
55− kisIonAkxSbxllZMnjbkShZEdATYKeT9o5NEhnU4YnHfc5bJZbiWOZAzYGLcY7g8
56− vDQ31pBItyY4pFgPbSpNlbUvUsoPVJ45RasRADDTNCzMzdjFQQXst2V9AoGBAOm7
57− sSpzYfFPLEAhieAkuhtbsX58Boo46djiKVfzGftfp6F9aHTOfzGORU5jrZ16mSbS
58− qkkC6BEFrATX2051dzzXC89fWoJYALrsffE5I3KlKXsCAWSnCP1MMxOfH+Ls61Mr
59− 7pK/LKfvJt53mUH4jIdbmmFUDwbg18oBEH+x9PmbAoGAS/+JqXu9N67rIxDGUE6W
60− 3tacI0f2+U9Uhe67/DTZaXyc8YFTlXU0uWKIWy+bw5RaYeM9tlL/f/f+m2i25KK+
61− vrZ7zNag7CWU5GJovGyykDnauTpZaYM03mN0VPT08/uc/zXIYqyknbhlIeaZynCK
62− fDB3LUF0NVCknz20WCIGU0kCgYEAkxY0ZXx61Dp4pFr2wwEZxQGs7uXpz64FKyEX
63− 12r6nMATY4Lh6y/Px0W6w5vis8lk+5Ny6cNUevHQ0LNuJS+yu6ywl+1vrbrnqroM
64− f3LvpcPeGLSoX8jl1VDQi7aFgG6LoKly1xJLbdsH4NPutB9PgBbbTghx9GgmI88L
65− rPA2M6UCgYBOmkYJocNgxg6B1/n4Tb9fN1Q/XuJrFDE6NxVUoke+IIyMPRH7FC3m
66− VMYzu+b7zTVJjaBb1cmJemxl/xajziWDofJYPefhdbOVU7HXtmJFY0IG3pVxU1zW
67− 3bmDj5QAtCUDpuuNa6GEIT0YR4+D/V7o3DmlZ0tVIwKJmVJoQ2f5dw==
68− -----END RSA PRIVATE KEY-----
69− '';
36+ secretFile = pkgs.writeText "secret" "Aig5zaic";
37+ otpFile = pkgs.writeText "otpsecret" "Riew9mue";
38+ dbFile = pkgs.writeText "dbsecret" "we2quaeZ";
39+ jwsFile = pkgs.runCommand "oidcKeyBase" {} "${pkgs.openssl}/bin/openssl genrsa 2048 > $out";
7040 };
7141 };
7242 };