Notes - MCS
Identification, Authentication and Authorization
Notes - MCS
Identification, Authentication and Authorization
  • Identification, Authentication and Authorization
  • Access Control Models
    • Access types
    • Least privilege principle
    • Access control models
      • Access control kinds
    • Access control kinds
    • Separation of duties
    • Segregation of duties
    • Information flow models
    • Multilevel security
    • Windows mandatory integrity control
    • Clark-Wilson Integrity Model
  • OAuth 2.0 Authorization Framework
    • Goal
    • Roles (RFC 6749)
    • Communication endpoints
    • Application (client)
    • OAuth tokens
    • OAuth flows
      • Code flow
      • Implicit flow
      • Resource owner password flow
      • Client credentials flow
    • Proof Key for Code Exchange (PKCE, RFC 7636)
    • Device authorization grant (RFC 8628)
    • Actual protocol flow
  • Linux Security Mechanisms
    • Mechanisms
    • Linux management privileges
    • Privilege Elevation
    • Capabilities
    • Files extended attributes (xattr)
    • File capabilities
    • Capability transfer across exec
    • Control groups (cgroups)
    • Linux Security Modules (LSM)
    • AppArmor
    • Confinement
  • Authentication Protocols
    • Identity attributes
    • Authentication
    • Authentication interactions
    • Authentication of people
      • Biometrics
      • Token-based OTP generators
      • PAP & CHAP (RFC 1334, 1992, RFC 1994, 1996)
      • S/Key (RFC 2289, 1998)
      • GSM
    • Host authentication
    • Service/server authentication
    • TLS (Transport Layer Security, RFC 8446)
    • SSH (Secure Shell, RFC 4251)
    • Single Sign-On (SSO)
    • Authentication metaprotocols
    • Authentication services
    • Key distribution services
  • PAM (Pluggable Authentication Modules)
    • Motivation
    • PAM
    • PAM APIs
    • Orchestration of PAM actions
    • Module invocation
    • Configuration files
    • PAM orchestration files
    • Scenario 1 – Local authentication
    • Scenario 2 – LDAP auth with local backoff
    • Scenario 3 – MS AD auth with local backoff
  • FIDO and FIDO2 framework
    • FIDO (Fast Identity Online) Alliance
    • Universal 2nd Factor (U2F) protocol
    • WebAuthn
    • Client to Authenticator Protocol (CTAP)
    • Passkeys
  • Authentication with Trusted Third Parties / KDCs
    • Shared-key authentication
    • Key Distribution Center (KDC) concept
    • Kerberos
  • Identity Management
    • Digital Identity
    • Identity Manager (IdM)
    • Identity Provider (IdP)
    • Authoritative source
    • Identity claim
    • Approachs
    • Credential
    • Privacy issues
    • Verifiable credential (VC)
    • Self-Sovereign Identity (SSI)
    • Interoperability
    • eIDAS
  • Anonymity and Privacy
    • Privacy
    • IEEE Digital Privacy Model
    • Privacy with computing technology
    • Privacy and companies
    • Privacy and IAA
    • Identification
    • Authentication
    • Anonymity
    • Microdata privacy issues
    • Microdata privacy enhancing
    • L-Diversity
Powered by GitBook
On this page
  • Features
  • Classic Unix authentication
  • Validation
  • Obtained credentials
  • Architecture
  • Actions
  • Modules
  • Orchestration files
  • Detailed Architecture
  1. PAM (Pluggable Authentication Modules)

PAM

Features

Independent authentication protocols/mechanisms.

  • Linux password, S/Key, smartcards, biometrics, etc.

  • One module per protocol/mechanism.

Orchestration of protocols/mechanisms.

  • Alone or combined.

  • AND and OR combinations.

  • Application-independent.

Several interface approaches.

  • Input from text consoles of graphical windows.

  • Access to special devices (smart-cards, biometric readers, etc.).

Modular and extensible architecture.

  • Dynamic loading of required modules.

  • Handling of several actions besides authentication.

    • Password management.

    • Accounting management.

    • Session management.

Default orchestration per host.

  • Defined by the administrator.

    • Username/password, biometrics, smart-cards, etc.

Application-specific orchestrations.

  • Each application can use a unique orchestration.

Classic Unix authentication

Requested input: username + password.

Validation

  • An active account for username.

    • Entry with the username in the /etc/passwd file.

  • Transformed password for that username.

    • Entry with the username in the /etc/shadow file.

  • Transformation of the provided password with the function and the salt used for that username.

  • Comparison with the stored transformation.

Obtained credentials

  • UID + GID [+ list of secondary GIDs]

  • New process descriptor (login shell)

Architecture

Actions

  • Authentication (auth).

    • Identity verification.

  • Account Management (account).

    • Enforcement of access policies based on account properties.

  • Password Management (password).

    • Management of authentication credentials.

  • Session Management (session).

    • Verification of operational parameters.

    • Setup of session parameters.

      • max memory, max file descriptions, graphical interface configuration, ...

Modules

Dynamically loaded (shared libraries).

  • /lib/security/pam_*.so

  • /lib/x86_64-linux-gnu/security/pam_*.so

Standard API.

  • Functions provided by the modules that are used.

    • C interfaces.

    • Python wrapper exists.

  • The decision is provided on the returned code.

    • AM_SUCCESS

    • PAM_AUTH_ERR, PAM_AUTHINFO_UNAVAIL, etc…

  • Not all functions need to be implemented.

    • A module does not need to implement all 4 actions.

Orchestration files

Typically, one per PAM client application.

  • e.g. /etc/pam.d/ftp or /etc/pam.d/ssh

  • Can use shared files: /etc/pam.d/common-auth

Specify how the actions should be applied.

  • Their mechanisms (modules).

  • Their parameters.

  • Their termination, with or without success.

Each module uses a particular set of resources.

  • Local files.

    • /etc/passwd, /etc/shadow, /etc/groups, etc.

  • Distributed information or located in remote servers.

    • NIS, Kerberos, LDAP, etc.

Detailed Architecture

Last updated 1 year ago