diff --git a/config/oidc-broker.broker b/config/oidc-broker similarity index 71% rename from config/oidc-broker.broker rename to config/oidc-broker index d811e543..d62104f1 100644 --- a/config/oidc-broker.broker +++ b/config/oidc-broker @@ -1,12 +1,12 @@ [authd] name = OIDC Broker -brand_icon = broker_icon.png -dbus_name = com.ubuntu.authd.oidc_broker -dbus_object = /com/ubuntu/authd/oidc_broker +brand_icon = {abs_path_to_icon} +dbus_name = com.ubuntu.authd.OidcBroker +dbus_object = /com/ubuntu/authd/OidcBroker [oidc] issuer = https://{issuer_url} -client_id = client_id +client_id = {client_id} # The amount of days the user will be allowed to authenticate without a network connection. offline_expiration = 180 diff --git a/snap/hooks/install b/snap/hooks/install new file mode 100644 index 00000000..974fcabe --- /dev/null +++ b/snap/hooks/install @@ -0,0 +1,24 @@ +#!/bin/sh +set -eu + +snap_base_dir=$(dirname ${SNAP}) + +cat < ${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 diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml new file mode 100644 index 00000000..fb269650 --- /dev/null +++ b/snap/snapcraft.yaml @@ -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