Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PrivateStorageio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PrivateStorage
PrivateStorageio
Commits
c0410bb7
Commit
c0410bb7
authored
3 years ago
by
Florian Sesser
Browse files
Options
Downloads
Patches
Plain Diff
Add zkapissuer user and group and make PaymentServer run as it
parent
8a25df13
No related branches found
No related tags found
3 merge requests
!180
merge develop into production
,
!177
merge develop into staging
,
!146
Manage access to payment metrics
Pipeline
#938
failed
3 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
morph/lib/issuer.nix
+4
-4
4 additions, 4 deletions
morph/lib/issuer.nix
nixos/modules/issuer.nix
+21
-0
21 additions, 0 deletions
nixos/modules/issuer.nix
with
25 additions
and
4 deletions
morph/lib/issuer.nix
+
4
−
4
View file @
c0410bb7
...
...
@@ -9,15 +9,15 @@ rec {
secrets
=
{
"ristretto-signing-key"
=
{
destination
=
"/run/keys/ristretto.signing-key"
;
owner
.
user
=
"
root
"
;
owner
.
group
=
"
root
"
;
owner
.
user
=
"
zkapissuer
"
;
owner
.
group
=
"
zkapissuer
"
;
permissions
=
"0400"
;
action
=
[
"sudo"
"systemctl"
"restart"
"zkapissuer.service"
];
};
"stripe-secret-key"
=
{
destination
=
"/run/keys/stripe.secret-key"
;
owner
.
user
=
"
root
"
;
owner
.
group
=
"
root
"
;
owner
.
user
=
"
zkapissuer
"
;
owner
.
group
=
"
zkapissuer
"
;
permissions
=
"0400"
;
action
=
[
"sudo"
"systemctl"
"restart"
"zkapissuer.service"
];
};
...
...
This diff is collapsed.
Click to expand it.
nixos/modules/issuer.nix
+
21
−
0
View file @
c0410bb7
...
...
@@ -155,6 +155,13 @@ in {
serviceConfig
.
Restart
=
"always"
;
serviceConfig
.
Type
=
"simple"
;
# Run w/o privileges
serviceConfig
=
{
DynamicUser
=
false
;
User
=
"zkapissuer"
;
Group
=
"zkapissuer"
;
};
script
=
let
# Compute the right command line arguments to pass to it. The
...
...
@@ -182,6 +189,20 @@ in {
"
${
cfg
.
package
}
/bin/PaymentServer-exe
${
originArgs
}
${
issuerArgs
}
${
databaseArgs
}
${
httpArgs
}
${
stripeArgs
}
"
;
};
# PaymentServer runs as this user and group by default
# Mind the comments in nixpkgs/nixos/modules/misc/ids.nix: "When adding a uid,
# make sure it doesn't match an existing gid. And don't use uids above 399!"
ids
.
uids
.
zkapissuer
=
397
;
ids
.
gids
.
zkapissuer
=
397
;
users
.
extraGroups
.
zkapissuer
.
gid
=
config
.
ids
.
gids
.
zkapissuer
;
users
.
extraUsers
.
zkapissuer
=
{
uid
=
config
.
ids
.
uids
.
zkapissuer
;
isNormalUser
=
false
;
group
=
"zkapissuer"
;
# Let PaymentServer read from keys, if necessary.
extraGroups
=
[
"keys"
];
};
# Open 80 and 443 for the certbot HTTP server and the PaymentServer HTTPS server.
networking
.
firewall
.
allowedTCPPorts
=
[
80
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment