From 53129dabaa169d2a1671f88f9116f004d0596ac0 Mon Sep 17 00:00:00 2001 From: Dominik George <dominik.george@teckids.org> Date: Wed, 19 May 2021 11:17:57 +0200 Subject: [PATCH] Rename to nss-pam-webapi --- .gitlab-ci.yml | 4 ++-- Cargo.toml | 8 ++++---- README.md | 12 ++++++------ ...oidc.example.toml => nss_pam_webapi.example.toml} | 4 ++-- src/lib.rs | 2 +- src/nss.rs | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) rename etc/{nss_pam_oidc.example.toml => nss_pam_webapi.example.toml} (89%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1e55356..eb23a01 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,7 @@ build: - apt-get -y install libjq-dev libonig-dev libpam0g-dev script: - cargo build --release - - strip target/release/libnss_pam_oidc.so + - strip target/release/libnss_pam_webapi.so artifacts: paths: - - target/release/libnss_pam_oidc.so + - target/release/libnss_pam_webapi.so diff --git a/Cargo.toml b/Cargo.toml index d651218..546e8ac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,15 +1,15 @@ [package] -name = "nss_pam_oidc" +name = "nss_pam_webapi" version = "0.1.0" authors = ["Dominik George <dominik.george@teckids.org>"] edition = "2018" -description = "NSS/PAM modules for OpenID Connect/OAuth2" -repository = "https://edugit.org/lanki.cloud/glue/nss-pam-oidc" +description = "NSS/PAM modules for use with Web APIs (OAuth 2.0, REST)" +repository = "https://edugit.org/lanki.cloud/glue/nss-pam-webapi" license = "Apache-2.0" categories = ["authentication", "os", "os::linux-apis"] [lib] -name = "nss_pam_oidc" +name = "nss_pam_webapi" crate-type = [ "cdylib" ] [dependencies] diff --git a/README.md b/README.md index c1a6218..53c62b6 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -# NSS/PAM modules for OpenID Connect/OAuth2 +# NSS/PAM modules for use with Web APIs (OAuth 2.0, REST) -`nss-pam-oidc` is a multi-purpose shared library that links Linux +`nss-pam-webapi` is a multi-purpose shared library that links Linux system authentication (PAM) and name resolution for users and groups (NSS) to an OAuth2 API. It is "multi-purpose" because it builds a single shared object file exposing both the APIs of PAM and NSS. It can be used: - * in `/lib/security/pam_oidc.so` as PAM module - * in `/lib/libnss_oidc.so` as NSS database module - * in `/sbin/nss_pam_oidc_cached` as caching daemon to speed up requests + * in `/lib/security/pam_webapi.so` as PAM module + * in `/lib/libnss_webapi.so` as NSS database module + * in `/sbin/nss_pam_webapi_cached` as caching daemon to speed up requests ## System authentication (PAM module) @@ -100,7 +100,7 @@ It can only be used if the OAuth server used supports refresh tokens so will break name resolution once the access token expires until the user logs in anew). -## Caching daemon (`nss_pam_oidc_cached`) +## Caching daemon (`nss_pam_webapi_cached`) The caching daemon is a system service that periodically keeps data from the API up to date. It handles the following data: diff --git a/etc/nss_pam_oidc.example.toml b/etc/nss_pam_webapi.example.toml similarity index 89% rename from etc/nss_pam_oidc.example.toml rename to etc/nss_pam_webapi.example.toml index 71ce037..a48444f 100644 --- a/etc/nss_pam_oidc.example.toml +++ b/etc/nss_pam_webapi.example.toml @@ -3,12 +3,12 @@ auth_url = "https://ticdesk-dev.teckids.org/oauth/authorize/" token_url = "https://ticdesk-dev.teckids.org/oauth/token/" [pam] -# You might want to put these into a separate file nss_pam_oidc.secret.toml! +# You might want to put these into a separate file nss_pam_webapi.secret.toml! client_id = "Df1cpPEBsbG64oZ1Q1L8NetH1UKNBUyA5qhxg1Zh" client_secret = "" [nss] -# You might want to put these into a separate file nss_pam_oidc.secret.toml! +# You might want to put these into a separate file nss_pam_webapi.secret.toml! client_id = "z8Oz0tG56QRo9QEPUZTs5Eda410FMiJtYxlInxKE" client_secret = "" diff --git a/src/lib.rs b/src/lib.rs index 109b9bb..983bd33 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -const BASE_NAME: &str = "nss_pam_oidc"; +const BASE_NAME: &str = "nss_pam_webapi"; // Modules and macro imports for our own code #[macro_use] extern crate log; diff --git a/src/nss.rs b/src/nss.rs index 8bf7ba5..0b54973 100644 --- a/src/nss.rs +++ b/src/nss.rs @@ -157,4 +157,4 @@ impl PasswdHooks for OidcPasswd { } } -libnss_passwd_hooks!(oidc, OidcPasswd); +libnss_passwd_hooks!(webapi, OidcPasswd); -- GitLab