Skip to content

Commit

Permalink
Package Siemens Linux Entra SSO for Himmelblau
Browse files Browse the repository at this point in the history
This packages the linux-entra-sso.py, as well as
all the configuration necessary to force install
the extension for Firefox, Chrome, and Chromium.

Signed-off-by: David Mulder <[email protected]>
  • Loading branch information
dmulder committed Nov 12, 2024
1 parent d0aff37 commit ef07890
Show file tree
Hide file tree
Showing 18 changed files with 709 additions and 8 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ members = [
"src/file_permissions",
"src/broker",
"src/sshd-config",
"src/sso",
]
resolver = "2"

Expand Down
2 changes: 1 addition & 1 deletion images/rpm/Dockerfile.fedora41
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ WORKDIR /himmelblau
RUN cargo install cargo-generate-rpm

# Build the project and create the RPM package
CMD cargo clean && cargo build --release && strip -s target/release/*.so && strip -s target/release/aad-tool && strip -s target/release/himmelblaud && strip -s target/release/himmelblaud_tasks && strip -s target/release/broker && cargo generate-rpm -p src/daemon && cargo generate-rpm -p src/nss && cargo generate-rpm -p src/pam && cargo generate-rpm -p src/sshd-config
CMD cargo clean && cargo build --release && strip -s target/release/*.so && strip -s target/release/aad-tool && strip -s target/release/himmelblaud && strip -s target/release/himmelblaud_tasks && strip -s target/release/broker && cargo generate-rpm -p src/daemon && cargo generate-rpm -p src/nss && cargo generate-rpm -p src/pam && cargo generate-rpm -p src/sshd-config && cargo generate-rpm -p src/sso
2 changes: 1 addition & 1 deletion images/rpm/Dockerfile.rawhide
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ WORKDIR /himmelblau
RUN cargo install cargo-generate-rpm

# Build the project and create the RPM package
CMD cargo clean && cargo build --release && strip -s target/release/*.so && strip -s target/release/aad-tool && strip -s target/release/himmelblaud && strip -s target/release/himmelblaud_tasks && strip -s target/release/broker && cargo generate-rpm -p src/daemon && cargo generate-rpm -p src/nss && cargo generate-rpm -p src/pam && cargo generate-rpm -p src/sshd-config
CMD cargo clean && cargo build --release && strip -s target/release/*.so && strip -s target/release/aad-tool && strip -s target/release/himmelblaud && strip -s target/release/himmelblaud_tasks && strip -s target/release/broker && cargo generate-rpm -p src/daemon && cargo generate-rpm -p src/nss && cargo generate-rpm -p src/pam && cargo generate-rpm -p src/sshd-config && cargo generate-rpm -p src/sso
2 changes: 1 addition & 1 deletion images/rpm/Dockerfile.rocky8
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ WORKDIR /himmelblau
RUN cargo install cargo-generate-rpm

# Build the project and create the .deb package
CMD cargo clean && cargo build --release && strip -s target/release/*.so && strip -s target/release/aad-tool && strip -s target/release/himmelblaud && strip -s target/release/himmelblaud_tasks && strip -s target/release/broker && cargo generate-rpm -p src/daemon && cargo generate-rpm -p src/nss && cargo generate-rpm -p src/pam && cargo generate-rpm -p src/sshd-config
CMD cargo clean && cargo build --release && strip -s target/release/*.so && strip -s target/release/aad-tool && strip -s target/release/himmelblaud && strip -s target/release/himmelblaud_tasks && strip -s target/release/broker && cargo generate-rpm -p src/daemon && cargo generate-rpm -p src/nss && cargo generate-rpm -p src/pam && cargo generate-rpm -p src/sshd-config && cargo generate-rpm -p src/sso
2 changes: 1 addition & 1 deletion images/rpm/Dockerfile.rocky9
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ WORKDIR /himmelblau
RUN cargo install cargo-generate-rpm

# Build the project and create the .deb package
CMD cargo clean && cargo build --release && strip -s target/release/*.so && strip -s target/release/aad-tool && strip -s target/release/himmelblaud && strip -s target/release/himmelblaud_tasks && strip -s target/release/broker && cargo generate-rpm -p src/daemon && cargo generate-rpm -p src/nss && cargo generate-rpm -p src/pam && cargo generate-rpm -p src/sshd-config
CMD cargo clean && cargo build --release && strip -s target/release/*.so && strip -s target/release/aad-tool && strip -s target/release/himmelblaud && strip -s target/release/himmelblaud_tasks && strip -s target/release/broker && cargo generate-rpm -p src/daemon && cargo generate-rpm -p src/nss && cargo generate-rpm -p src/pam && cargo generate-rpm -p src/sshd-config && cargo generate-rpm -p src/sso
2 changes: 1 addition & 1 deletion images/rpm/Dockerfile.sle15sp6
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ WORKDIR /himmelblau
RUN cargo install cargo-generate-rpm

# Build the project and create the RPM package
CMD cargo clean && cargo build --release && strip -s target/release/*.so && strip -s target/release/aad-tool && strip -s target/release/himmelblaud && strip -s target/release/himmelblaud_tasks && strip -s target/release/broker && cargo generate-rpm -p src/daemon && cargo generate-rpm -p src/nss && cargo generate-rpm -p src/pam && cargo generate-rpm -p src/sshd-config
CMD cargo clean && cargo build --release && strip -s target/release/*.so && strip -s target/release/aad-tool && strip -s target/release/himmelblaud && strip -s target/release/himmelblaud_tasks && strip -s target/release/broker && cargo generate-rpm -p src/daemon && cargo generate-rpm -p src/nss && cargo generate-rpm -p src/pam && cargo generate-rpm -p src/sshd-config && cargo generate-rpm -p src/sso
2 changes: 1 addition & 1 deletion images/rpm/Dockerfile.tumbleweed
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ WORKDIR /himmelblau
RUN cargo install cargo-generate-rpm

# Build the project and create the RPM package
CMD cargo clean && cargo build --release && strip -s target/release/*.so && strip -s target/release/aad-tool && strip -s target/release/himmelblaud && strip -s target/release/himmelblaud_tasks && strip -s target/release/broker && cargo generate-rpm -p src/daemon && cargo generate-rpm -p src/nss && cargo generate-rpm -p src/pam && cargo generate-rpm -p src/sshd-config
CMD cargo clean && cargo build --release && strip -s target/release/*.so && strip -s target/release/aad-tool && strip -s target/release/himmelblaud && strip -s target/release/himmelblaud_tasks && strip -s target/release/broker && cargo generate-rpm -p src/daemon && cargo generate-rpm -p src/nss && cargo generate-rpm -p src/pam && cargo generate-rpm -p src/sshd-config && cargo generate-rpm -p src/sso
2 changes: 1 addition & 1 deletion images/ubuntu/Dockerfile.22.04
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ WORKDIR /himmelblau
RUN cargo install cargo-deb

# Build the project and create the .deb package
CMD cargo clean && cargo deb --deb-revision=ubuntu22.04 -p himmelblaud && cargo deb --deb-revision=ubuntu22.04 -p nss_himmelblau && cargo deb --deb-revision=ubuntu22.04 -p pam_himmelblau && cargo deb --deb-revision=ubuntu22.04 -p sshd-config
CMD cargo clean && cargo deb --deb-revision=ubuntu22.04 -p himmelblaud && cargo deb --deb-revision=ubuntu22.04 -p nss_himmelblau && cargo deb --deb-revision=ubuntu22.04 -p pam_himmelblau && cargo deb --deb-revision=ubuntu22.04 -p sshd-config && cargo deb --deb-revision=ubuntu22.04 -p sso
2 changes: 1 addition & 1 deletion images/ubuntu/Dockerfile.24.04
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ WORKDIR /himmelblau
RUN cargo install cargo-deb

# Build the project and create the .deb package
CMD cargo clean && cargo deb --deb-revision=ubuntu24.04 -p himmelblaud && cargo deb --deb-revision=ubuntu24.04 -p nss_himmelblau && cargo deb --deb-revision=ubuntu24.04 -p pam_himmelblau && cargo deb --deb-revision=ubuntu24.04 -p sshd-config
CMD cargo clean && cargo deb --deb-revision=ubuntu24.04 -p himmelblaud && cargo deb --deb-revision=ubuntu24.04 -p nss_himmelblau && cargo deb --deb-revision=ubuntu24.04 -p pam_himmelblau && cargo deb --deb-revision=ubuntu24.04 -p sshd-config && cargo deb --deb-revision=ubuntu24.04 -p sso
40 changes: 40 additions & 0 deletions src/sso/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[package]
name = "sso"
description = "Entra ID SSO via Himmelblau Identity Broker"
version.workspace = true
authors.workspace = true
rust-version.workspace = true
edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[package.metadata.deb]
name = "himmelblau-sso"
depends = ["python3-pydbus"]
assets = [
["src/linux-entra-sso.py", "usr/bin/linux-entra-sso", "755"],
["src/firefox/linux_entra_sso.json", "usr/lib/mozilla/native-messaging-hosts/", "644"],
["src/firefox/policies.json", "etc/firefox/policies/", "644"],
["src/chrome/linux_entra_sso.json", "etc/opt/chrome/native-messaging-hosts/", "644"],
["src/chrome/linux_entra_sso.json", "etc/chromium/native-messaging-hosts/", "644"],
["src/chrome/extension.json", "usr/share/google-chrome/extensions/jlnfnnolkbjieggibinobhkjdfbpcohn.json", "644"],
["src/chrome/policies.json", "etc/opt/chrome/policies/managed/himmelblau.json", "644"],
["src/chrome/policies.json", "etc/chromium/policies/managed/himmelblau.json", "644"],
]

[package.metadata.generate-rpm]
name = "himmelblau-sso"
assets = [
{ source = "src/linux-entra-sso.py", dest = "/usr/bin/linux-entra-sso", mode = "755" },
{ source = "src/firefox/linux_entra_sso.json", dest = "/usr/lib64/mozilla/native-messaging-hosts/", mode = "644" },
{ source = "src/firefox/policies.json", dest = "/etc/firefox/policies/", mode = "644" },
{ source = "src/chrome/linux_entra_sso.json", dest = "/etc/opt/chrome/native-messaging-hosts/", mode = "644" },
{ source = "src/chrome/linux_entra_sso.json", dest = "/etc/chromium/native-messaging-hosts/", mode = "644" },
{ source = "src/chrome/extension.json", dest = "/usr/share/google-chrome/extensions/jlnfnnolkbjieggibinobhkjdfbpcohn.json", mode = "644" },
{ source = "src/chrome/policies.json", dest = "/etc/opt/chrome/policies/managed/himmelblau.json", mode = "644" },
{ source = "src/chrome/policies.json", dest = "/etc/chromium/policies/managed/himmelblau.json", mode = "644" },
]

[package.metadata.generate-rpm.requires]
python3-pydbus = "*"
Loading

0 comments on commit ef07890

Please sign in to comment.