Externalisierte Autorisierung mit XACMLalt.java-forum-stuttgart.de/jfs/2012/folien/E6.pdf · 2012....

44
© iC Consult GmbH - 05.07.2012 - Stefan Bohm Externalisierte Autorisierung mit XACML Die eXtensible Access Control Markup Language Java Forum Stuttgart 2012

Transcript of Externalisierte Autorisierung mit XACMLalt.java-forum-stuttgart.de/jfs/2012/folien/E6.pdf · 2012....

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Externalisierte Autorisierung mit XACML

    Die eXtensible Access Control Markup LanguageJava Forum Stuttgart 2012

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    über uns und mich...

    Stefan Bohm• Senior Consultant für Identity- und Accessmanagement

    iC Consult• Sitz: Oberhaching, München,• Lokationen: Stuttgart, Frankfurt, Essen, Hamburg, Zürich• 60 Angestellte, 10 Freelancer (Stand: 01.06.2012)

    2

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Kommt Ihnen das bekannt vor?

    3

    // Access to confidential documents requires client-cert authentication. if (document.getClassification() == Classification.CONFIDENTIAL) {

    if (req.getAuthType().equals(HttpServletRequest.CLIENT_CERT_AUTH)) {String userId = IdentityUtil.convertToUserId(req.getUserPrincipal());

    if (resource.getState() == State.DRAFT) { //Access control for document in state DRAFT String author = resource.getAuthorId(); if (req.isUserInRole(AUTHOR) && author.equalsIgnoreCase(userId) && (action == Action.READ || action == Action.WRITE)) { // allow r/w access for author of resource ... } } else if (req.isUserInRole(MANAGER) && IdentityUtil.isSupervisorOf(userId, author) && action == Action.READ) { // allow read access for manager of author ... } ...

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Was ist Autorisierung?

    4

    Subject ResourceAction

    ✘✔

  • PolicyDecision

    Point

    ✘✔

    © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Was ist Autorisierung?

    5

    PolicyEnforcement

    Point STOP

    ?

    ResourceSubjectAction

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Reality Check

    6

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Kontextbasierte Autorisierung

    7

    „Transaktionen dürfen nur zu Geschäftszeiten und aus

    dem Intranet getätigt werden.“

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Kontextbasierte Autorisierung

    8

    Subject ResourceAction

    Context

    A

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Feingranulare, attributbasierte Autorisierung

    9

    „Servicetechniker brauchen eine Freigabe des

    Werkstattleiters bevor sie sicherheitsrelevante

    Steuergerätesoftware einspielen dürfen.“

    „Servicetechniker brauchen eine Freigabe des

    Kaufmännischen Leiters bevor sie Teile bestellen

    dürfen.“

    „Kundenberater sollen ebenfalls Teile bestellen

    können.“

    „Freigabe für Teilebestellung muss pro Automobilmarke

    erfolgen .“

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Feingranulare, attributbasierte Autorisierung

    10

    SubjectResource

    Action

    role = service-techniciansecRelevantSW = falseteileBestellung = true

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Inhaltsbasierte Autorisierung

    11

    „Ein Dokument im Zustand DRAFT darf nur für den

    Autor einsehbar und änderbar sein.“

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Inhaltsbasierte Autorisierung

    12

    Subject ResourceAction

    DRAFT bob 123456 ...

    subject-id = bob

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Segregation of Duties

    13

    "Eine Bestellung darf nicht von der Person aufgegeben werden, die sie genehmigt

    hat."

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    eXtensible Access Control Markup Language

    • XML-basierte Sprache für Attribute-based Access Control• OASIS-Standard• Version 1.0: 2003• Version 2.0: 2005• Version 3.0: wird aktuell veröffentlicht

    14

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    eXtensible Access Control Markup Language

    • Alle verfügbaren Informationen können verwendet werden:• Subject-Attribute• Resource-Attribute• Action-Attribute• Environment-Attribute

    • Unterstützt alle wichtigen Autorisierungsmodelle:• Access Control Lists (ACLs)• Role-Based Access Control (RBAC)• Attribute-Based Access Control (ABAC)• Risk-Adaptive Access Control (RAdAC)• Mandatory Access Control (MAC)• Whitelists/Blacklists• Context-Based Authorization• Content-Based Authorization• ...

    15

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    XACML definiert...

    16

    Request/Response Protokoll

    Referenz-Architektur

    Policy Schema

    XACML

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Referenzarchitektur

    17

    Policy Enforcement

    PointSTOP

    PolicyDecision

    Point✘✔

    PolicyRetrieval

    PointPolicy

    AdministrationPoint

    Policy Information

    Point

    Resource

  • Application-Server

    PDP✘✔

    © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Beispielhafte, konkrete Architektur

    18

    Web-Server Application-Server

    PEPSTOP

    PEPSTOP

    Applikations-DB

    Policy-DB

    PRP User-Directory

    PIP

  • Request

    © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Request/Response Protokoll

    19

    PEPSTOP

    ✘✔

    PDP✘✔

    Subject Attributes

    Action Attributes

    Resource Attributes

    Environment Attributes

    Response

    Decision

    Status

    Obligations

    Advices

    attribute_A = value1attribute_B = value2...

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Beispiel für den Einsatz von Obligations

    20

    ✘✔

    PDP✘✔

    Web Service

    XML Gateway

    Response

    Obligation:Signiere und VerschlüssleSOAP-Response

    Obligation:Lösche Inhalt von Element "author"

    Obligation:Schreibe Audit-Record

    Result: PERMIT ✔

    Web Service

    Consumer STOP

    Corporate Firewall

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Policy-Struktur

    21

    PolicySet0..*

    Ruleeffect

    0..*

    Policy

    1..*

    Condition0..1

    0..1

    0..10..1 Target

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Rule-Struktur

    22

    Rule

    TargetRule wird angewendet auf ...

    ConditionRule wird angewendet falls ...

    EffectWenn Rule angewendet wurde, liefere zurück: PERMIT oder DENY

    subject-role = "author"AND

    resource-type = "document"

    subject-id IS_IN ./document/document-info/authorAND

    resource-action IS_IN { "read", "write" }

    Wenn

    Dann PERMIT

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Combining Algorithms

    23

    PERMIT

    DENY

    NOT_APPLICABLE

    INDETERMINATE

    PERMIT

    Rule Combining Algorithm

    z.B.• first-applicable• deny-overrides• permit-overrides

    PERMIT

    Effekte der einzelnen Rules Effekt der Policy

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Verschachtelung von PolicySets

    24

    Produktgruppen

    Produkte

    Komponenten

    PolicySet

    Policy

    PolicySet

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Entwickeln wir eine Beispielpolicy...

    25

    Benutzerdürfen auf

    Ressourcen,die als Confidential klassifiziert sind,nur dann zugreifen,

    wenn sie sich über ein

    starkes Authentisierungsverfahren angemeldet haben.

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Erst brauchen wir Attribute und Definitionen...

    26

    Subject

    auth-strength: Integer

    Resource

    classification: String

    Benutzer ist über starkes Authentisierungsverfahren angemeldet, wenn auth-strength >= 2

    classification ∈ { "PUBLIC", "INTERNAL", "CONFIDENTIAL", "SECRET" }

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Rumpf der Policy

    27

    Target: Ressourcen mit classification=CONFIDENTIAL

    Target: Subjects mit auth-strength >= 2

    Target: Subjects mit auth-strength < 2

    Advice: required-auth-strenght=2

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm 28

    CONFIDENTIAL

    Target der Policy

    http://www.w3.org/2001/XMLSchema#stringhttp://www.w3.org/2001/XMLSchema#stringhttp://www.w3.org/2001/XMLSchema#stringhttp://www.w3.org/2001/XMLSchema#string

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Target der Permit-Rule

    29

    2

    http://www.w3.org/2001/XMLSchema#integerhttp://www.w3.org/2001/XMLSchema#integerhttp://www.w3.org/2001/XMLSchema#integerhttp://www.w3.org/2001/XMLSchema#integer

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Target der Deny-Rule

    30

    2

    http://www.w3.org/2001/XMLSchema#integerhttp://www.w3.org/2001/XMLSchema#integerhttp://www.w3.org/2001/XMLSchema#integerhttp://www.w3.org/2001/XMLSchema#integer

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Advice

    31

    2

    http://www.w3.org/2001/XMLSchema#integerhttp://www.w3.org/2001/XMLSchema#integer

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    XACML ist etwas textlastig...

    32

    Policy demonstrating the use of Advices to trigger stronger user authentication http://www.w3.org/TR/1999/REC-xpath-19991116 CONFIDENTIAL 2

    Es geht weiter...

    http://www.w3.org/TR/1999/REC-xpath-19991116http://www.w3.org/TR/1999/REC-xpath-19991116http://www.w3.org/2001/XMLSchema#stringhttp://www.w3.org/2001/XMLSchema#stringhttp://www.w3.org/2001/XMLSchema#stringhttp://www.w3.org/2001/XMLSchema#stringhttp://www.w3.org/2001/XMLSchema#integerhttp://www.w3.org/2001/XMLSchema#integerhttp://www.w3.org/2001/XMLSchema#integerhttp://www.w3.org/2001/XMLSchema#integer

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm 33

    2 2

    ...

    XACML ist etwas textlastig...

    http://www.w3.org/2001/XMLSchema#integerhttp://www.w3.org/2001/XMLSchema#integerhttp://www.w3.org/2001/XMLSchema#integerhttp://www.w3.org/2001/XMLSchema#integerhttp://www.w3.org/2001/XMLSchema#integerhttp://www.w3.org/2001/XMLSchema#integer

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Mit kommerziellem PAP-UI

    34

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    XACML Erweiterbarkeit

    • Datentypen• Funktionen• Combining Algorithms• Technische Profile

    • Definieren zusätzliche Funktionalität• z.B. Multiple-Decision Profile

    • Nichttechnische Profile• Beschreiben Best-Practices• z.B.

    • RBAC Profile• Hierarchical Resource Profile• Administration and Delegation Profile

    35

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    APIs und SPIs

    APIs zur Integration des PEPs• Open Source

    • OpenAz• Herstellerspezifisch

    SPIs zur Integration von PIP, PRP und PAP• Herstellerspezifisch

    SPIs zur Erweiterung von XACML• Herstellerspezifisch

    36

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    OpenAZ-Beispiel

    37

    PepRequest req = pep.newPepRequest( subject, action, resource, environment);PepResponse resp = req.decide();boolean permit = resp.allowed();Map obligations = resp.getObligations();

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Produkte

    • Open Source• JBoss PicketBox• SunXACML

    • Kommerziell• Axiomatics• Oracle• Nextlabs• Quest

    38

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Wohin geht die Reise?

    39

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    XACML ermöglicht

    • Attributbasierte, feingranulare, kontextbasierte und inhaltsbasierte Autorisierung

    • Die Umsetzung der wichtigsten Autorisierungsmodelle• Applikations- und technologieunabhängige Autorisierung• Konsistente Autorisierungsregeln über Applikationen und

    Plattformen hinweg• Management von Autorisierungsregeln ohne

    Quellcodeänderung

    40

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Aktueller Stand

    XACML 3.0 ist ein ausgereifter Standard

    Aber:• Es gibt keine XACML-Produktsuites im Open-Source-

    Bereich• Knappe Auswahl im kommerziellen Bereich• „Was ist erlaubt?“-Queries nicht im Standard behandelt• Attributmanagement als neue Disziplin („privilege-giving

    attributes“)

    41

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm

    Unsere Beobachtungen

    • XACML wird in einigen Unternehmen in großem Maßstab eingesetzt.

    • Bedarf nach standardbasierter, externalisierter Autorisierung steigt durch:• SOA und cloud-basierte Architekturen• Geschäftsmodelle mit starker Endkunden-Interaktion• Anforderungen aus GRC (Governance, Risk & Compliance)

    42

  • © iC Consult GmbH - 05.07.2012 - Stefan Bohm 43

    Auch im realen Leben macht grobgranulare Autorisierung oft wenig Sinn.

  • © iC Consult GmbH - 05.06.2012 - Stefan Bohm

    Vielen Dank für Ihre Aufmerksamkeit.

    KONTAKT

    Stefan [email protected]

    iC Consult GmbHKeltenring 1482041 Oberhaching

    44

    mailto:[email protected]:[email protected]://www.ic-consult.comhttp://www.ic-consult.com