Skip to content

Update release with new fabrica-based services; remove old services#50

Draft
travisbcotton wants to merge 4 commits intomainfrom
trcotton/tokensmith-container
Draft

Update release with new fabrica-based services; remove old services#50
travisbcotton wants to merge 4 commits intomainfrom
trcotton/tokensmith-container

Conversation

@travisbcotton
Copy link
Copy Markdown

@travisbcotton travisbcotton commented Apr 2, 2026

Pull Request Template

Thank you for your contribution! Please ensure the following before submitting:

Checklist

  • My code follows the style guidelines of this project
  • I have added/updated comments where needed
  • I have added tests that prove my fix is effective or my feature works
  • I have run make test (or equivalent) locally and all tests pass
  • DCO Sign-off: All commits are signed off (git commit -s) with my real name and email
  • REUSE Compliance:
    • Each new/modified source file has SPDX copyright and license headers
    • Any non-commentable files include a <filename>.license sidecar
    • All referenced licenses are present in the LICENSES/ directory

Description

Please include a summary of the change and which issue is fixed.
Also include relevant motivation and context.

Fixes #(issue)

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

For more info, see Contributing Guidelines.

@travisbcotton travisbcotton marked this pull request as draft April 7, 2026 20:51
Signed-off-by: Travis Cotton <trcotton@lanl.gov>
Signed-off-by: Travis Cotton <trcotton@lanl.gov>
Signed-off-by: Travis Cotton <trcotton@lanl.gov>
@travisbcotton travisbcotton force-pushed the trcotton/tokensmith-container branch from 9bf779d to ef8d070 Compare April 7, 2026 20:52
@travisbcotton travisbcotton changed the title added tokensmith basic config file; update env file Update release with new fabrica-based services; remove old services Apr 7, 2026
Signed-off-by: Travis Cotton <trcotton@lanl.gov>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a quick note glancing at this: The files in systemd/containers/ are named *.container instead of *.service. It looks like that also applies to metadata-service.service too.

@@ -0,0 +1,30 @@
[Unit]
Description=The bss container
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bss container -> The boot-service container

@@ -36,6 +22,15 @@ SMD_DBUSER=smd-user
SMD_DBOPTS=sslmode=disable
SMD_JWKS_URL=http://opaal:3333/keys
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what changes have been made to SMD with the tokensmith integration, but this would probably need to be changed or removed.

Copy link
Copy Markdown
Contributor

@davidallendj davidallendj Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This script needs to be copied and permissions changed in the openchami.spec file. I'm not sure exactly where it goes but I'm guessing here.

cp scripts/tokensmith_bootstrap_token.sh          %{buildroot}/usr/bin
# ...
chmod +x %{buildroot}/usr/bin/tokensmith_bootstrap_token.sh

*Edit: It looks like the tokensmith_bootstrap_token.sh script should be placed in /usr/local/sbin/ judging by the ExecStartPre path in the boot-service.service file.

EnvironmentFile=/etc/openchami/configs/openchami.env

# Volumes
Volume=/etc/openchami/tokensmith.json:/tokensmith/config.json:Z
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be /etc/openchami/tokensmith.json -> /etc/openchami/configs/tokensmith.json since tokensmith.json is copied from systemd/configs/tokensmith.json to /etc/openchami/configs/tokensmith.json in the spec file.

@davidallendj
Copy link
Copy Markdown
Contributor

davidallendj commented Apr 9, 2026

Just a couple of other notes before merging. We need to update the *.container files to use the most up-to-date version of our services including:

  1. SMD after this PR is merged.
  2. Tokensmith to v0.3.0 or later
  3. Boot-service after creating a release
  4. Metadata-service after creating a release

We also need to update systemd/targets/openchami.target to require the new services as well.

@davidallendj
Copy link
Copy Markdown
Contributor

davidallendj commented Apr 9, 2026

Another note...we're going to update the CoreDHCP config in /etc/openchami/configs/coredhcp.yaml to reflect the change from this PR if we upgrade to the latest version.

Here's snippet of the tutorial config should look like after the changes:

    - coresmd: |
        svc_base_uri=https://demo.openchami.cluster:8443 
        ipxe_base_uri=http://172.16.0.254:8081 
        ca_cert=/root_ca/root_ca.crt 
        cache_valid=30s 
        lease_time=1h 
        single_port=false
    - bootloop: |
        lease_file=/tmp/coredhcp.db 
        script_path=default 
        lease_time=5m 
        ipv4_start=172.16.0.200 
        ipv4_end=172.16.0.250

@@ -36,6 +22,15 @@ SMD_DBUSER=smd-user
SMD_DBOPTS=sslmode=disable
Copy link
Copy Markdown
Contributor

@davidallendj davidallendj Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the changes from this PR it looks like we need to some more variables (or flags) to get SMD to work with tokensmith:

  • SMD_AUTH_BACKEND=tokensmith (or -auth-backend flag)
  • SMD_AUTH_ISSUER=https://tokensmith.openchami.dev (or -auth-issuer flag; I'm assuming this should be the same as TOKENSMITH_ISSUER)
  • SMD_AUTH_AUDIENCES= (or -auth-audiences flag which I think should be the services that consume the token)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants