FreeIPA hands-on tutorial



Similar documents
FreeIPA Cross Forest Trusts

Building Open Source Identity Management with FreeIPA. Martin Kosek

FreeIPA - Open Source Identity Management in Linux

Identity Management based on FreeIPA

Handling POSIX attributes for trusted Active Directory users and groups in FreeIPA

FreeIPA 3.3 Trust features

SSSD. Client side identity management. LinuxAlt 2012 Jakub Hrozek 3. listopadu 2012

FreeIPA Client and Server

Red Hat Identity Management

SSSD Active Directory Improvements

Table of Contents. Red Hat Summit Labs. Lab Overview... 3 Background... 3

Identity Management: The authentic & authoritative guide for the modern enterprise

FreeIPA Client and Server

Red Hat Enterprise Identity (IPA) Centralized Management of Identities & Authentication

How to build an Identity Management System on Linux. Simo Sorce Principal Software Engineer Red Hat, Inc.

Integrating Linux systems with Active Directory

LinuxCon North America

External and Federated Identities on the Web

FreeIPA v3: Trust Basic trust setup

AD Integration options for Linux Systems

Managing Identity & Access in On-premise and Cloud Environments. Ellen Newlands Identity Management Product Manager Red Hat, Inc

Interoperability Update: Red Hat Enterprise Linux 7 beta and Microsoft Windows

RHEL Clients to AD Integrating RHEL clients to Active Directory

System Security Services Daemon

Security Provider Integration Kerberos Authentication

Websense Support Webinar: Questions and Answers

Advancements in Linux Authentication and Authorisation using SSSD

Install and Configure an Open Source Identity Server Lab

Single sign-on websites with Apache httpd: Integrating with Active Directory for authentication and authorization

CAC AND KERBEROS FROM VISION TO REALITY

Fedora 18 FreeIPA: Identity/ Policy Management

1 Introduction. Ubuntu Linux Server & Client and Active Directory. Page 1 of 14

Authentication in a Heterogeneous Environment

Red Hat Enterprise ipa

Fedora 17 FreeIPA: Identity/ Policy Management

Integrating Red Hat Enterprise Linux 6 with Microsoft Active Directory Presentation

Configuring Sponsor Authentication

Active Directory and Linux Identity Management

Using Active Directory as your Solaris Authentication Source

Active Directory Integration

Cross-Realm Trust Interoperability, MIT Kerberos and AD

Going in production Winbind in large AD domains today. Günther Deschner (Red Hat / Samba Team)

The following process allows you to configure exacqvision permissions and privileges for accounts that exist on an Active Directory server:

Integration with Active Directory. Jeremy Allison Samba Team

Configuring idrac6 for Directory Services

VMware Identity Manager Administration

SSSD and OpenSSH Integration

User-ID Best Practices

VMware Identity Manager Administration

CA Performance Center

Likewise Open Installation and Administration Guide

PineApp Surf-SeCure Quick

Embedded Web Server Security

Embedded Web Server Security

OS Installation: CentOS 5.8

LDAP-UX Client Services B with Microsoft Windows Active Directory Administrator's Guide

Smart Card Authentication Client. Administrator's Guide

Configuration Guide BES12. Version 12.1

Integrating OID with Active Directory and WNA

Configuration Guide BES12. Version 12.2

TIBCO Spotfire Platform IT Brief

CYAN SECURE WEB HOWTO. NTLM Authentication

Introduction to Linux (Authentication Systems, User Accounts, LDAP and NIS) Süha TUNA Res. Assist.

Enabling single sign-on for Cognos 8/10 with Active Directory

Univention Corporate Server. Extended domain services documentation

Samba as an Active Directory Domain Controller

Active Directory 2008 Implementation. Version 6.410

Administration Guide. . All right reserved. For more information about Specops Password Sync and other Specops products, visit

PKI Made Easy: Managing Certificates with Dogtag. Ade Lee Sr. Software Engineer Red Hat, Inc

Integrating VMware Horizon Workspace and VMware Horizon View TECHNICAL WHITE PAPER

1 Introduction. Windows Server & Client and Active Directory.

SUSE Manager 1.2.x ADS Authentication

Guide to SASL, GSSAPI & Kerberos v.6.0

Centrify Identity and Access Management for Cloudera

Configuration Guide. BlackBerry Enterprise Service 12. Version 12.0

Configuration Guide BES12. Version 12.3

External Identity and Authentication Providers For Apache HTTP Server

Allowing Linux to Authenticate to a Windows 2003 AD Domain. Prepared by. Thomas J. Munn, CISSP 11-May-06

Implementing Linux Authentication and Authorisation Using SSSD

freeipa Installation and Deployment Guide IPA Solutions from the IPA Experts

SSSD DNS Improvements in AD Environment

Integrating EJBCA and OpenSSO

MongoDB Security Guide

User Identification (User-ID) Tips and Best Practices

Vintela Authentication from SCO Release 2.2. System Administration Guide

GL-550: Red Hat Linux Security Administration. Course Outline. Course Length: 5 days

OnCommand Performance Manager 1.1

MongoDB Security Guide

Nevepoint Access Manager 1.2 BETA Documentation

Configuring HP Integrated Lights-Out 3 with Microsoft Active Directory

White Paper. Fabasoft on Linux - Preparation Guide for Community ENTerprise Operating System. Fabasoft Folio 2015 Update Rollup 2

Windows Security and Directory Services for UNIX using Centrify DirectControl

Getting Started Guide

RSA Authentication Manager 7.1 Microsoft Active Directory Integration Guide

Setup Guide Access Manager 3.2 SP3

Click Studios. Passwordstate. Installation Instructions

ENTERPRISE LINUX SECURITY ADMINISTRATION

Configuring User Identification via Active Directory

ACE Management Server Deployment Guide VMware ACE 2.0

Fedora Directory Server FUDCon III London, 2005

Transcription:

FreeIPA hands-on tutorial Fedora 18 update: Active Directory trusts and more Alexander Bokovoy Jakub Hrozek Martin Kos ek Red Hat Inc. LinuxCon Europe November 5th, 2012

1 Preparation 2 Installation 3 Active Directory trusts 4 Users 5 Certificates, keytabs 6 HBAC 7 RBAC 8 Replication 9 Other features 10 SSSD: More than a FreeIPA client

Section 1 Preparation

Preparation Lab structure Use cases will use 3 VMs and the host machine server: server.ipa-x.example.com - will host an IPA server replica: replica.ipa-x.example.com - will host an IPA replica client: client.ipa-x.example.com - will host IPA client with a web server Instructor machine hosts: IPA: server.ipa-0.example.com - will host an IPA server IPA: replica.ipa-0.example.com - will host an IPA replica IPA: client.ipa-0.example.com - will host an IPA client with a web server AD: ad.example.com - Active Directory domain AD: dc.ad.example.com - Active Directory domain controller

Section 2 Installation

Installation Install IPA server Check install options in ipa-server-install --help Core options: --external-ca, --setup-dns, --selfsign Most common install issues: broken DNS, bad /ect/hosts configuration --no-host-dns, --setup-dns Remains after the last unsuccessful install /var/lib/ipa/sysrestore/ Time issues (Kerberos time sensitive) - on clients, replicas ipa-server-install --setup-dns

Installation Install IPA server (cont.) kinit as admin, check tickets with klist Check logs (useful for debugging): /var/log/pki-ca/debug /var/log/pki-ca-install.log /var/log/dirsrv/ (permissions!) /var/log/messages Try ipactl command See certificates tracked in certmonger: ipa-getcert list Check main IPA configuration: /etc/ipa/default.conf base DN, realm Check automatically created DNS records (A, SRV) ipa dnszone-find ipa dnsrecord-find Check Web UI interface

Section 3 Active Directory trusts

Active Directory trusts Kerberos cross-forest trusts FreeIPA deployment is a fully managed Kerberos realm Can be integrated with Windows as RFC4120-compliant Kerberos realm Traditional Kerberos trust management applies: on GNU/Linux side ~/.k5login should be defined to impersonate users with identities on Active Directory side manual mapping is performed with special tools in a similar way Does not scale well for thousands of users and hosts: a foreign realm principal impersonates our realm s user requires additional management of special users to impersonate doubling the management effort mapping has to happen on every single machine. Manually?

Active Directory trusts Kerberos cross-forest trusts Active Directory native cross forest trusts Require two Active Directory domains AD domain establishes trust with another AD domain via LSA RPC AD uses LSA RPC and Global Catalog to map incoming principals to SIDs technically: KDC + CLDAP + LSA RPC + LDAP on a port 3268 FreeIPA provides CLDAP, KDC and LDAP, Samba provides LSA RPC Stage 1: allow AD users to connect to FreeIPA services e.g. PuTTY from Windows machine connecting to FreeIPA ssh service Stage 2: allow FreeIPA users to interactively log in into AD machines Requires support for Global Catalog on FreeIPA server side not implemented yet

Active Directory trusts FreeIPA v3 architecture Full overview is available at http://freeipa.org/page/ipav3_architecture

Active Directory trusts Kerberos cross-forest trusts What was missing? Samba passdb backend to FreeIPA supporting trust storage and retrieval CLDAP plugin to FreeIPA to respond on AD discovery queries FreeIPA KDC backend to generate MS PAC and support case-insensitive searches Configuration tools to setup trusts

Active Directory trusts Kerberos cross-forest trusts FreeIPA passdb backend: Expansion of traditional LDAP passdb backend New schema objects and attributes to support trusted domain information Support for uid/gid ranges for multi-master replicas Kerberos principal creation for foreign domain account FreeIPA KDC backend: Generates MS PAC information out of LDAP info and add to the ticket Allows to accept principals and tickets from a trusted cross forest realm Verifies and sign MS PAC coming from a trusted cross forest realm

Active Directory trusts Kerberos cross-forest trusts FreeIPA configuration tools: FreeIPA has command line (CLI) and Web user interfaces ipa trust-add creates new cross-forest trust CLI operates with Kerberos authentication Request is sent to FreeIPA server via XML-RPC over HTTPS with Kerberos auth FreeIPA uses S4U2Proxy Kerberos feature to allow constrained delegation Samba 4 Python bindings are used to establish trust Code runs under non-privileged account (apache) Uses Kerberos ticket obtained via XML-RPC with the help of mod kerb auth Issues Kerberos-authenticated LSA RPC requests to a local smbd Uses AD credentials or shared secret passed via XML-RPC request to talk to AD DC

Active Directory trusts Install Active Directory trusts support Pre-requisites: freeipa-server-trust-ad package Run ipa-adtrust-install as root to define NetBIOS (short) name for the domain set up Samba to use FreeIPA for searching users and storing trusted domains information set up DNS service records expected by the Active Directory clients set up additional plugins in 389-ds directory server configure Kerberos KDC to handle MS-PAC in trusted tickets Caveats: Check that DNS resolution works from both Active Directory and FreeIPA sides If there is no common upstream DNS server, set up DNS forwarders After ipa-adtrust-install run we are ready to create AD trusts!

Active Directory trusts Create trust to Active Directory domain Following command creates the trust ipa trust-add [--type=ad] ad.example.com --admin Administrator --password Explanation: --type=ad trust type (defaults to Active Directory trust) ad.example.com DNS name of Active Directory domain --admin NAME name of administrative account from Active Directory capable to create trusts --password ask for the AD admin password Typical issues: Active Directory is relying on DNS SRV records on resource discovery. Kerberos is relying on clock synchronization more than 5 minutes skew will break things ipa-adtrust-install suggests firewall configuration update, don t ignore it!

Section 4 Users

Users User management, account lockout As admin: Add new user we will use for tests: ipa user-add --first=test --last=user ruser Try editing user s attribute: ipa user-mod ruser --shell=/bin/bash As ruser: kinit 3 times with incorrect password You can check ipa user-status ruser in the process (as admin) Fourth kinit will be rejected As admin: ipa user-status ruser - account is locked As admin, you have 2 ways to unlock user: ipa unlock ruser ipa passwd user - resets the password ruser is now able to log in

Users Allow access from trusted domain Trusted domain users authenticate with Kerberos principals user@ad.example.com These principals are mapped automatically to uids with SSSD, Winbindd, and 389-ds plugins Each trusted domain user receives its own primary group equal to the uid of the user To apply access controls, trust domain users and groups should belong to POSIX groups First map security identifier (SID) to non-posix group in FreeIPA Then include non-posix group to existing POSIX group in FreeIPA Use the POSIX group in all access controls (HBAC and SUDO rules)

Users Allow access from trusted domain Following sequence will map group AD\Domain users to POSIX group strangers with use of strangers ext non-posix group: ipa group-add strangers ext --external ipa group-add-member strangers ext --external AD\Domain users ipa group-add strangers ipa group-add-member strangers --groups strangers ext

Users Allow access from trusted domain (cont.) Additionally, every host that will provide services to trusted domain users, needs to have SSSD and krb5.conf configured to recognize them. [ l i b d e f a u l t s ].... d n s l o o k u p k d c = t r u e.... Listing 1: krb5.conf [ r e a l m s ] IPA X.EXAMPLE.COM = {.... a u t h t o l o c a l = \ RULE : [ 1 : $1@$0 ] ( ˆ. @AD.EXAMPLE.COM$) s /@AD.EXAMPLE.COM/@ad. example. com/ a u t h t o l o c a l = DEFAULT }

Users Allow access from trusted domain (cont.) In sssd.conf subdomains provider = ipa ensures that sssd will be able to look up users in trusted domains. services =..., pac ensures that user membership information from MS PAC (http:// tools.ietf.org/html/draft-brezak-win2k-krb-authz-01) is evaluated as well. [ domain / ipa X. example. com ]... s u b d o m a i n s p r o v i d e r = i p a... [ s s s d ] s e r v i c e s = nss, pam, ssh, pac Listing 2: sssd.conf

Section 5 Certificates, keytabs

Certificates, keytabs Building a secured web server Let s now build a secured web server that would accept trusted users Log in to client machine Make sure that IPA server is resolvable ipa-client-install Prepare content for httpd: cp workshop.conf /etc/httpd/conf.d/workshop.conf cp workshop.wsgi /var/www/cgi-bin/workshop.wsgi Create the IPA service entry for httpd: ipa service-add HTTP/ hostname Configure SSSD and Kerberos to accept trusted users

Certificates, keytabs Building a secured web server: SSL certificate Create NSS certificate database for httpd mkdir /etc/httpd/alias; cd /etc/httpd/alias certutil -N -d. chown :apache *.db && chmod g+rw *.db certutil -G -d. certutil -A -d. -n IPA CA -t CT,, -a < /etc/ipa/ca.crt

Certificates, keytabs Building a secured web server: SSL certificate (cont.) Reqest a signed certificate for the service certutil -R -d. -a -g 2048 -s CN= hostname,o=ipa-x.example.com > web.csr ipa cert-request --principal=http/ hostname web.csr ipa cert-show $SERIAL NO --out=web.crt certutil -A -d. -n Server-Cert -t u,u,u -i web.crt certutil -L -d. -n Server-Cert certutil -V -u V -d. -n Server-Cert - valid certificate Check /etc/httpd/conf.d/nss.conf and start httpd

Certificates, keytabs Building a secured web server: Kerberos authentication Retrieve a keytab for httpd service ipa-getkeytab -p HTTP/ hostname -k http.keytab -s server ipa service-show HTTP/ hostname - keytab indicator is True klist -kt http.keytab Configure httpd to use the keytab mv http.keytab /etc/httpd/conf/ chown apache:apache /etc/httpd/conf/http.keytab chmod 0400 /etc/httpd/conf/http.keytab Update /etc/httpd/conf.d/workshop.conf and enable Kerberos authentication Restart httpd Test the page secured via Kerberos authentication Open with web browser, OR curl -k --negotiate -u : https:// hostname

Section 6 HBAC

HBAC Host Based Access Control - Authorization Check allow all HBAC rule Allows users to access all services in IPA realm Disable allow all HBAC rule ruser cannot log in to client As admin: Create hostgroup webservers Add client to webservers Create HBAC rule allow on client and then: ipa hbacrule-add-host allow on client --hostgroups=webservers ipa hbacrule-add-user allow on client --users=ruser ipa hbacrule-add-group allow on client --groups=strangers ipa hbacrule-add-service allow on client --hbacsvcs=sshd,login Verify the rule: Log in to client with ruser, admin Check hbactest in CLI and Web UI Try to log in from Windows machine using PuTTY and web interface

Section 7 RBAC

RBAC Role Based Access Control As ruser: ipa user-add --first=john --last=doe jdoe - fails due to missing privileges As admin: ipa role-find ipa role-add-member User Administrator --users=ruser As ruser: ipa user-add --first=john --last=doe jdoe - suceeds ipa user-del jdoe

Section 8 Replication

Replication Create a replica Prepare replica info file and install replica ipa-replica-prepare ipa-replica-install Notice ipa-replica-conncheck is run before installation Check logs (ipareplica-install) Install DNS service on replica as well ipa-dns-install To debug replica agreements: View agreements with ipa-replica-manage list Run raw LDAP searches: ldapsearch -h localhost -Y GSSAPI -b cn=config "(objectclass=nsds5replicationagreement)" ldapsearch -h localhost -Y GSSAPI -b cn=config "(nsds5replicaid=*)"

Section 9 Other features

SELinux user mappings per-user per-host contexts the user receives requires SSSD on the client side Centralized management of SUDO rules SUDO can enforce either directly or via the SSSD Centralized management of automounter maps consumable directly or via the SSSD as well

Section 10 SSSD: More than a FreeIPA client

SSSD: More than a FreeIPA client SSSD a client side of the IPA, but can be (and often is!) used standalone a system daemon that provides its own NSS and PAM modules the modules just proxy requests to the SSSD the daemon is stateful keeps track of network status, server availability supports several back ends LDAP Kerberos IPA Active Directory (new in 1.9.0)

SSSD: More than a FreeIPA client New features of the SSSD in Fedora 18 a native Active Directory provider caching of SUDO rules caching of automounter maps the ability to act as a client for setups with AD trusts notable performance improvements

SSSD: More than a FreeIPA client The Active Directory Provider LDAP + Kerberos underneath uses the AD-specific tokengroups attribute to optimize group lookups defaults tailored to match the Active Directory environments enrollment is a separate issue provided by the realmd project new in Fedora 18, very easy to use yum install realmd realm join --user Username ad.example.com both server and desktop use case

SSSD: More than a FreeIPA client Integration with the SUDO utility SSSD acts as a proxy between SUDO and LDAP SSSD provides a persistent cache and also smart and configurable refresh rules requires sudo 1.8.6p3 or newer IPA supports sudoers compat tree in ou=sudoers,$basedn ldapsearch -Y GSSAPI -b "ou=sudoers,$basedn" sudo provider = ldap in sssd.conf sudoers: files sss in nsswitch.conf Try to create sudo rules in IPA, see results in sudoers compat tree

The end. Thanks for listening.