Use "baonix" to read secrets (test workloads only) #362
No reviewers
Labels
No labels
Compat/Breaking
Difficulty/Architectural
Difficulty/Easy
Difficulty/Hard
Help Wanted
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Testing
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
Reviewed/Confirmed
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Security
Silenced Alert
Status/Abandoned
Status/Blocked
Status/Need More Info
Status/Postponed
Tracking Issue
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: afnix/infra#362
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "consume-machine-identity-secrets"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The aim here is to have an end-to-end first use of workload identity to retrieve secrets and make them available to services.
The first production target are monitoring and backups which are easy and global to every machines that will come in another PR.
Notable differences with agenix:
/run/agenix.d/18/...
spire-agent.service
— introduce a secret at that level and the system will not like it.Planned features:
systemctl set-environment DEBUG_BAONIX_POLICIES=1
and restart and the required policies will be printed for every secret.Depends on #360.ab981876a9
tof5b3259a98
f5b3259a98
to6ed5c2c01a
6ed5c2c01a
to84492f2a01
84492f2a01
tod55bf1397f
d55bf1397f
to1f732a1f91
@ -0,0 +101,4 @@
example = [ "ovh-sbg-hv01-sts-jwt" "ovh-lim-hv01-sts-jwt" ];
description = "What is the authentication path for the JWT method?";
};
baoRole = mkOption {
I wish this wouldn't be necessary to specify as this is automatically calculated on the Vault side…
@ -0,0 +96,4 @@
default = "https://vault.afnix.fr";
description = "Address to the OpenBao instance";
};
baoAuthPath = mkOption {
Also would be nice not to specify that.
@ -0,0 +91,4 @@
Where secrets are created.
'';
};
baoAddress = mkOption {
Perhaps putting all bao related options under an bao tree would be good.
@ -0,0 +108,4 @@
};
secrets = mkOption {
type = types.attrsOf secretType;
default = { };
An example would be nice here.
@ -0,0 +11,4 @@
{ lib, config, ... }:
let
inherit (lib) mkIf concatMapAttrs nameValuePair listToAttrs;
trustDomain = config.networking.fqdn;
This could be grabbed directly from the SPIRE module.
@ -0,0 +23,4 @@
# NOTE(Raito): it's absolutely crucial this keeps being synchronized
# with Vault policies and their naming scheme.
# Any divergence will surface as failure to obtain a JWT-SVID.
spiffeID = "spiffe://${trustDomain}/tenants/${tenant}/svc/${svc}";
This could be put behind a common library file that generates spiffe ID names, avoiding the divergence.
@ -108,11 +107,21 @@ in
${concatStringsSep "\n" (mapAttrsToList (name: upstream: "${name} ${upstream};") cfg.redirects)}
}
log_format basic '$remote_addr [$time_local] '
@thubrecht if you're interested to take back these changes or criticize them :-)
@ -48,0 +48,4 @@
test = {
policy = {
"secret/data/afnix/test/*".capabilities = [
"create" "update" "read" "delete" "list"
Should probably be
"read
"list"" only.@ -42,0 +51,4 @@
# We want to verify that we can load test secrets.
baonix = {
audience = "afnix";
baoAuthPath = "jwt-ovh-sbg-hv01-sts-jwt";
Ideally, we should drop the last
-jwt
, it's redundant, this needs to happen at the Vault level.@ -41,1 +50,4 @@
# We want to verify that we can load test secrets.
baonix = {
audience = "afnix";
Audience should be URIs. This needs to be fixed at the Vault level.
WIP: use "baonix" to read secrets for monitoring and backupsto Use "baonix" to read secrets for monitoring and backupsUse "baonix" to read secrets for monitoring and backupsto Use "baonix" to read secrets (test workloads only)1f732a1f91
to14afc4f914
@ -108,11 +107,21 @@ in
${concatStringsSep "\n" (mapAttrsToList (name: upstream: "${name} ${upstream};") cfg.redirects)}
}
log_format basic '$remote_addr [$time_local] '
I think it would be cool to log the hostname as well
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.