Presentation is loading. Please wait.

Presentation is loading. Please wait.

Moonshot IdP Moonshot workshop 6.2.2014 Sami Silén, CSC.

Similar presentations

Presentation on theme: "Moonshot IdP Moonshot workshop 6.2.2014 Sami Silén, CSC."— Presentation transcript:

1 Moonshot IdP Moonshot workshop 6.2.2014 Sami Silén, CSC

2 2 Connect | Communicate | Collaborate About Moonshot IdP Moonshot IdP is a Radius server capable to authenticate users and deliver user attribute(s) in a SAML assertion. To Authenticate users in a service side, routing infrastructure is needed Eduroam Trust router Haka? Eduroam and Trust router? SAML Assertion with attributes Fetch from the Attribute Authority Query from the database and construct in Radius

3 3 Connect | Communicate | Collaborate Eduroam in a nutshell User performs anonymous authentication if allowed (eg: Message is routed to the home organization and TTLS protected inner-tunnel is established between client and home server. Inner-tunnel is then used for user authentication with real organizational credentials. After successful authentication response is sent via outer tunnel. TLRS (Top Level Radius Server ).FI.CSC.FI.OTHER.FI WLAN.OTHER.FI User from CSC

4 4 Connect | Communicate | Collaborate Haka-federation in a nutshell IdP Organizational user repository SP SP user repository WAYF/DS User performs login to SP SP redirects user to DS for discovering where user is from. After discovery SP redirects user to the users organizational identity provider (IdP) where user performs authentication. IdP fetches user information and encrypts it before submission to the SP (via browser)

5 5 Connect | Communicate | Collaborate Moonshot in a nutshell Someone could say it’s ”Eduroam + Haka” Haka authentication outside the web. In the world where there are no browser to pass assertion (response from IdP) nor DS for discovery. Discovery can be handled with Radius routing (or later via Trust router?). Assertion can be delivered inside Radius reply.

6 6 Connect | Communicate | Collaborate Moonshot In a pilot phase topology is similar with eduroam. Radius server has to reply with assertion containing a EPPN attribute. Either by Creating it itself or requesting it from the SAML IdP..FI.TUT.FI.CSC.FI SERVICE.CSC.FI User from TUT

7 7 Connect | Communicate | Collaborate Radius reply with SAML-AAA-Assertion Sending Access-Accept of id 16 to port 41746 Message-Authenticator = 0x00000000000000000000000000000000 User-Name = “jsmith" SAML-AAA-Assertion = " \n jsmith " MS-MPPE-Recv-Key = 0xf0371df7e2ecc33c199f0b2fcc8e7c89126128ea4f99d3fef24a7d871a332089 MS-MPPE-Send-Key = 0x2a46f3e2a78c497726ceb159427223fb3730475b9dd9863162a9ac2618323c9b EAP-Message = 0x03080004

8 8 Connect | Communicate | Collaborate Haka Moonshot Pilot Requirements Requirements (Server side) Radius server capable to Authenticate users Deliver assertion with eppn attribute Moonshot Pilot Root server SSH Requirements (Client side) Linux workstation with Moonshot UI, libraries and openSSH Windows workstation with Moonshot libraries (Windows SSP) Credentials in Windows Credential Manager SSH Client supporting GSS API (Pending)

9 9 Connect | Communicate | Collaborate Moonshot IdP configuration Preconditions Radius configured according to eduroam instructions (FR3) Radius configured to add SAML-AAAA-Assertion to reply Shibboleth Identity Provider with soap endpoint configured – – OR Radius configured to build SAML-AAAA-Assertion itself. – (Gives an idea how to build assertion with freeradius)

10 10 Connect | Communicate | Collaborate Assertion with Radius # # Look up our Moonshot local user (the FedId) from our "fed_id_map" table (the glue between CUI and the FedID). # Any non-association will get the CUI as the user # # Only requests that contain a GSS attribute will get a SAML assertion # if ( ("%{request:GSS-Acceptor-Service-Name}") && ("%{request:GSS-Acceptor-Host-Name}") ) { update control { Tmp-String-1 := `/bin/date -u +%FT%TZ` Tmp-String-2 := `/usr/bin/uuidgen` } update reply { SAML-AAA-Assertion = " " SAML-AAA-Assertion += ' ' SAML-AAA-Assertion += ' ' SAML-AAA-Assertion += ' ' SAML-AAA-Assertion += " %{%{reply:Chargeable-User-Identity}:- unknown} " SAML-AAA-Assertion += ' ' SAML-AAA-Assertion += ' ' SAML-AAA-Assertion += " %{%{sql:SELECT fed_id_map.local_uid FROM `fed_id_map` WHERE fed_id_map.rad_cui = '%{reply:Chargeable-User-Identity}'}:-%{reply:Chargeable-User-Identity}} " SAML-AAA-Assertion += ' ' SAML-AAA-Assertion += ' ' SAML-AAA-Assertion += ' ' } } Example: Not tested

11 11 Connect | Communicate | Collaborate Assertion from Shibboleth IdP Freeradius-pysaml2 is a python module you can use to fetch information about user from a SAML2 Attribute Authority (AA) Platform requirements RPMS: libxml2-devel libxslt-devel libtool-ltdl-devel make python- mako memcached python-memcached python-setuptools gcc Python Modules: argparse (easy_install argparse, needed by Other (download and compile): – Pysaml2 – Xmlsec – Repoze.who (should install automatically when needed)

12 12 Connect | Communicate | Collaborate Freeradius-pysaml2 Freeradius-pysaml2 Before compilation configure module accordingly (README). Destination folder for freeradius-pysaml2 is /usr/local/etc/moonshot Also trust must be established between radius and IdP (metadata exchange). Configuration files: (make a copy of this to

13 13 Connect | Communicate | Collaborate Freeradius-pysaml2 CONFIG = 'pysaml_config' # PySAML2 Configuration file name IDENTITY_CACHE = "/usr/local/etc/moonshot/identity_cache" STATE_CACHE = "/usr/local/etc/moonshot/state_cache" METADATA_FILE = "/usr/local/etc/moonshot/metadata.xml“ SIGN = False SP_NAME_QUALIFIER = "" NAME_QUALIFIER = “"“ NAMEID_FORMAT = "urn:oasis:names:tc:SAML:2.0:nameid-format:eduPersonPrincipalName" # This is necessary to pick information about the right AA from the metadata file. This must be the entity ID of # the AA not the endpoint ATTRIBUTE_AUTHORITY = "" # Attribute filters per service@hostname the key are GSS-Acceptor-Service-Name+': # '+GSS-Acceptor-Host-Name and the attribute names are the so called friendly-names ATTRIBUTE_FILTER = { "": ["eduPersonPrincipalName"], }

14 14 Connect | Communicate | Collaborate NameID NameID is used to identify the person that the IdP has issued an assertion about. Name identifiers can be anything; an email address or a Kerberos principal name are common, every-day examples of such information. In earlier we configured NAMEID_FORMAT = "urn:oasis:names:tc:SAML:2.0:nameid-format:eduPersonPrincipalName“ From radius server we receive userid with realm, therefore it might be convenient to use eduPersonPrincipalName as a NameID(on most cases I assume that this is eppn). Example of soap message generated by freeradius-pysaml2

15 15 Connect | Communicate | Collaborate Direct Principal Connector IdP maps a name identifier back in to an identifier for the user (e.g. their login id). This identifier is known as a principal name and so the plugin that connects the name identifier to a principal name is known as the PrincipalConnector. “Direct” assumes the value of the name identifier is the user's principal name and as such performs no mapping If we’re using following Principal Connector we have to filter domain part before we can match it to login id

16 16 Connect | Communicate | Collaborate Remove realm from the Principal RegexSplit for removing everything after @ In resolver:DataConnector add dependency for regex_principal_split and use splitted value, this works if you don’t have any userid with @ on it. Approach by Paul Caskey

17 17 Connect | Communicate | Collaborate Freeradius-pysaml2 Sections from to be checked out BASE = CONFIG = { "service": { "sp": { "required_attributes": ["eduPersonPrincipalName"], "optional_attributes": ["schacHomeOrganization","schacHomeOrganizationType"], "key_file": BASEDIR + "pki/ssl.key", "cert_file": BASEDIR + "pki/ssl.cert", "xmlsec_binary": "/usr/local/bin/xmlsec1", "organization": { }, "contact_person": [{ }],

18 18 Connect | Communicate | Collaborate Freeradius-pysaml2 installation Generate metadata file for radius > moonshot-radius.xml Set metadata for IdP/AA you want to use in etc/metadata.xml Set key/certificate to the pki directory (ssl.cert, ssl.key) modify template/modules_python_aa Replace freeradius-pysaml2 with freeradius_aa Copy template/modules_python_aa to /etc/raddb/modules/modules_python and template/modules_python Uncomment following from the, CONFIG_DIR = "/usr/local/etc/moonshot" sys.path.insert(0, CONFIG_DIR)

19 19 Connect | Communicate | Collaborate Freeradius-pysaml2 compilation Compile freeradius-pysaml2 module Checkout that radius has access to just created directory structure /usr/local/etc/moonshot (Radius has to have write access).

20 20 Connect | Communicate | Collaborate Freeradius-pysaml2 deploying instructions Start radius server in the foreground (radiusd –fXxx) Before ldap integration, testing with steve/testing may be feasible (enable from users file) Login can be tested with ’radtest steve "testing" localhost 1 testing123’ It’s easier to test in default before going to inner-tunnel

21 21 Connect | Communicate | Collaborate Open questions? Is security of outer-tunnel enough for attributes? Audiense in response (For who it is)?. Response/Assertion signing is not working, but maybe this is only valid when audience is used.

22 22 Connect | Communicate | Collaborate | | Connect | Communicate | Collaborate Thank you!

Download ppt "Moonshot IdP Moonshot workshop 6.2.2014 Sami Silén, CSC."

Similar presentations

Ads by Google