All Projects → outlook → libnss-aad

outlook / libnss-aad

Licence: MIT License
A glibc NSS plugin that implements an Azure Active Directory service

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to libnss-aad

devops-governance
Example end-to-end Governance Model from CI/CD to Azure Resource Manager. Use this project to deploy example AAD, ARM and Azure DevOps resources to learn about e2e RBAC.
Stars: ✭ 79 (+364.71%)
Mutual labels:  azure, azure-active-directory
AzureAuth
R package for OAuth 2.0 authentication with Azure Active Directory
Stars: ✭ 29 (+70.59%)
Mutual labels:  azure, azure-active-directory
script-samples
A sample gallery of scripts to manage all things Microsoft 365.
Stars: ✭ 56 (+229.41%)
Mutual labels:  azure, azure-active-directory
aks-azuredevops-agent
Self-hosted Azure DevOps Agent on Azure Kubernetes
Stars: ✭ 29 (+70.59%)
Mutual labels:  azure
blue-teaming-with-kql
Repository with Sample KQL Query examples for Threat Hunting
Stars: ✭ 102 (+500%)
Mutual labels:  azure
iot-curriculum
Hands on labs and content for students and educators to learn and teach the Internet of Things at schools, universities, coding clubs, community colleges and bootcamps
Stars: ✭ 110 (+547.06%)
Mutual labels:  azure
communication-ui-library
UI Library for Azure Communication Services helps developers build communication applications with ease. From turn-key composites to UI components that can be composited together.
Stars: ✭ 44 (+158.82%)
Mutual labels:  azure
support-tickets-classification
This case study shows how to create a model for text analysis and classification and deploy it as a web service in Azure cloud in order to automatically classify support tickets. This project is a proof of concept made by Microsoft (Commercial Software Engineering team) in collaboration with Endava http://endava.com/en
Stars: ✭ 142 (+735.29%)
Mutual labels:  azure
cortana-intelligence-customer360
This repository contains instructions and code to deploy a customer 360 profile solution on Azure stack using the Cortana Intelligence Suite.
Stars: ✭ 22 (+29.41%)
Mutual labels:  azure
dcos-autoscaler
Autoscaler for DC/OS hosted in a cloud provider
Stars: ✭ 12 (-29.41%)
Mutual labels:  azure
jlik.me
URL Shortener project.
Stars: ✭ 31 (+82.35%)
Mutual labels:  azure
OpenSleigh
OpenSleigh is a Saga management library for .NET Core.
Stars: ✭ 198 (+1064.71%)
Mutual labels:  azure
doing-cli
CLI tool to simplify the development workflow on azure devops
Stars: ✭ 19 (+11.76%)
Mutual labels:  azure
warp
WARP one-click script. Add an IPv4, IPv6 or dual-stack CloudFlare WARP network interface and Socks5 proxy for VPS. 一键脚本
Stars: ✭ 950 (+5488.24%)
Mutual labels:  azure
CosmosDB
PowerShell Module for working with Azure Cosmos DB databases, collections, documents, attachments, offers, users, permissions, triggers, stored procedures and user defined functions.
Stars: ✭ 104 (+511.76%)
Mutual labels:  azure
TinyBlazorAdmin
Admin tools for Azure Url Shortener using Blazor Single Page Application (webassembly)
Stars: ✭ 33 (+94.12%)
Mutual labels:  azure
pipeline-as-code-with-jenkins
Pipeline as Code with Jenkins
Stars: ✭ 56 (+229.41%)
Mutual labels:  azure
dashboard
Notices about Azure services & features being deprecated
Stars: ✭ 86 (+405.88%)
Mutual labels:  azure
AzureServicesForUnity
Accessing Azure services (App Service, Table Storage, CosmosDB with Table API, Event Hubs) from a Unity game
Stars: ✭ 52 (+205.88%)
Mutual labels:  azure
AzureSMR
AzureSMR is no longer being actively developed. For ongoing support of Azure in R, see: https://github.com/Azure/AzureR
Stars: ✭ 60 (+252.94%)
Mutual labels:  azure

LibNSS-AAD: Linux Name Switch Service plugin for passwd and group lookups into Azure Active Directory

Introduction

This is a glibc NSS plugin that will query Azure Active Directory for information about users, written in Rust. It is very, very simple, and does not even go so far as to properly use OAuth2. It implements the following libc functions:

  • getpwnam
  • getpwuid
  • getgrnam
  • getgrgid
  • initgroups_dyn

This plugin works best with (and basically, though not actually, requires) nscd. Because nscd can have unintended effects on hosts, it is highly recommended that you refer to nscd.conf(5) and enable nscd caching only for passwd and group services, and set the various configuration options appropriately for your environment.

This plugin was written as a compliment to OpenSSH certificate authentication.

Security Considerations

This plugin provides a limited set of information to the system, and has some aspects that are worth mentioning.

  • UIDs are not sanity-checked, except for uid 0 (which the plugin will refuse to honor and return NSS_STATUS_NOTFOUND).
  • As currently implemented, UIDs are retrieved from the immutableId user attribute. This may not be appropriate in your environment.
  • GIDs are not checked, not even for GID 0.
  • The user password field returned is ., because OpenSSH considers a password field of * to indicate a locked account.

The /etc/nssaad.conf file must be readable by any user (privileged or not) that wants to obtain information from AAD (akin to the passwd service), and thus the Azure AD Application's client secret will be world-readable. Careful use of NSCD may alleviate this (as it may when using the bindpw option libnss-ldap), but very well may not. It is recommended that you limit the permissions granted to the Application, and not grant shell access to users whom you do not want querying the Directory.

Configuration

Plugin Configuration

The plugin expects to read from /etc/nssaad.conf, which is a YAML file:

client_id: "..."
client_secret: "..."
default_user_group_id: ###
domain_sid: "S-1-5-..."
tenant: "..."
  • client_id: is the Application ID of the AAD Application that you have created, and to which you have granted it the necessary permissions (namely, Directory.Read.All, or a combination of User.ReadBasic.All and Group.Read.All) to query data from the Graph API.
  • client_secret: is a key that the client can use to obtain an OAuth2 bearer token.
  • default_user_group_id: is the gid that users will have by default.
  • domain_sid: is the domain portion of the SID, including S-1-5- (basically any user or group SID without the relative ID at the end). NOTE: this only supports a single AD domain at the moment.
  • tenant: is your Azure AD tenant name, or its GUID.

NSS Configuration

Add the aad service to the /etc/nsswitch.conf file. Probably something like:

passwd:         compat aad
group:          compat aad

Installation

Upon building the library, copy the target/release/libnss_aad.so file to /lib/???-linux-gnu/libnss_aad.so.2.

Known Issues

  • Every call to the plugin results in at least one connection to the OAuth2 endpoint for a new token.
  • OpenSSH may consider a user account with a password field of * to be locked, and thus this plugin returns . instead.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].