-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Add default (generic OIDC) snap package for the broker (#21)
Add snap packaging for the default version of the broker. UDENG-2044
- Loading branch information
Showing
3 changed files
with
68 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
set -eu | ||
|
||
snap_base_dir=$(dirname ${SNAP}) | ||
|
||
cat <<EOF > ${SNAP_COMMON}/oidc-broker | ||
[authd] | ||
name = OIDC Broker | ||
brand_icon = ${snap_base_dir}/current/broker_icon.png | ||
dbus_name = com.ubuntu.authd.OidcBroker | ||
dbus_object = /com/ubuntu/authd/OidcBroker | ||
[oidc] | ||
issuer = https://{issuer_url} | ||
client_id = {client_id} | ||
# The amount of days the user will be allowed to authenticate without a network connection. | ||
# offline_expiration = 180 | ||
# The directory where the user's home directory will be created. | ||
# The user home directory will be created in the format of {home_base_dir}/{username} | ||
# home_base_dir = /home | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: oidc-broker | ||
summary: OIDC Broker for authd | ||
description: | | ||
Broker that enables OIDC authentication for authd. | ||
version: git | ||
grade: stable | ||
base: core24 | ||
confinement: strict | ||
license: GPL-3.0+ | ||
|
||
apps: | ||
oidc-broker: | ||
command: bin/oidc-broker | ||
daemon: simple | ||
slots: | ||
- dbus-oidc | ||
plugs: | ||
- network | ||
- config-files | ||
restart-condition: always | ||
|
||
slots: | ||
dbus-oidc: | ||
interface: dbus | ||
bus: system | ||
name: com.ubuntu.authd.OidcBroker | ||
|
||
plugs: | ||
config-files: | ||
interface: system-files | ||
read: | ||
- /etc/authd/brokers.d/oidc-broker | ||
|
||
parts: | ||
oidc-broker: | ||
source: . | ||
source-type: local | ||
plugin: go | ||
build-snaps: | ||
- go |