Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies...

43
Advanced Security Implementation On Mule 4 and Anypoint Platform Gerald Loeffler Senior Curriculum Developer and Technical Instructor, EMEA

Transcript of Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies...

Page 1: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

Advanced SecurityImplementationOn Mule 4 and Anypoint Platform

Gerald LoefflerSenior Curriculum Developer and Technical Instructor, EMEA

Page 2: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

Safe harbor statement

The information in this presentation is confidential and proprietary to MuleSoft and may not be disclosed without the permission of MuleSoft. This presentation is not subject to your license agreement or any other service or subscription agreement with MuleSoft. MuleSoft has no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation and MuleSoft's strategy and possible future developments, products and or platforms directions and functionality are all subject to change and may be changed by MuleSoft at any time for any reason without notice. The information on this document is not a commitment, promise or legal obligation to deliver any material, code or functionality. This document is provided without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. This document is for informational purposes and may not be incorporated into a contract. MuleSoft assumes no responsibility for errors or omissions in this document, except if such damages were caused by MuleSoft intentionally or grossly negligent.

All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, which speak only as of their dates, and they should not be relied upon in making purchasing decisions.

2

Page 3: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

Goals

3

1. Claims-based identity

2. Custom API policies in Mule 4

3. XML SDK components

Page 4: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc. 4

1. Motivation and approach

2. Solution overview

3. Interactions

4. Custom components

5. Summary

Page 5: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc. 5

1. Motivation and approach

2. Solution overview

3. Interactions

4. Custom components

5. Summary

Page 6: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

Motivation and approach

6

1. Anypoint Platform comes with API policies for authN and OAuth 2

2. Additional API security requirements:

a. User identity and properties without further authN or remote calls

b. Fine-grained access control to APIs

3. Custom API policies: implement bespoke security requirements

4. XML SDK: componentize Mule app-like functionality

Page 7: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc. 7

1. Motivation and approach

2. Solution overview

3. Interactions

4. Custom components

5. Summary

Page 8: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

Security and token realms

8

Page 9: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

This talk

9

Page 10: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

Claims-based identity

10

Page 11: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

Claims-based identity

11

Packages user properties in signed/encrypted User Claims Token

Page 12: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

Claims-based identity

12

Passed to downstream API

Page 13: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

Claims-based identity

13

Unpacks/decrypts and enforces User Claims Token

Page 14: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

Claims-based identity

14

Establishes trust with upstream API

Page 15: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

Claims-based identity

15

Access control: token validity and user claims

Page 16: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc. 16

1. Motivation and approach

2. Solution overview

3. Interactions

4. Custom components

5. Summary

Page 17: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

Detailed components

17

Page 18: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

API client sends HTTP request

18

OAuth 2 access token

Page 19: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

API policy calls OAuth 2 server

19

validate OAuth 2 access token

Page 20: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

In-process propagation of HTTP request

20

user identity

Page 21: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

Upstream API implementation

21

invokes downstream API

Page 22: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

In-process propagation of HTTP request

22

user identity

Page 23: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

Custom API policy

23

intercepts outgoing API invocation

Page 24: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

Custom component retrieves user claims

24

get user claims by user identity

Page 25: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

Custom component

25

packages and encrypts/signs User Claims Token

Page 26: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

Internal API invocation

26

User Claims Token as HTTP request header

Page 27: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

Custom API policy

27

intercepts incoming API invocation

Page 28: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

Custom component

28

unpacks and validates User Claims Token

Page 29: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

Custom API policy

29

enforces access control based on user claims

Page 30: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

In-process propagation of HTTP request

30

user identity and claims

Page 31: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

Downstream API implementation

31

executes API business logic

Page 32: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc. 32

1. Motivation and approach

2. Solution overview

3. Interactions

4. Custom components

5. Summary

Page 33: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

XML SDK component creating token

33

Page 34: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

XML SDK component creating token

34

Page 35: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

XML SDK component enforcing token

35

Page 36: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

XML SDK component enforcing token

36

Page 37: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

API policy intercepting outgoing HTTP request

37

Page 38: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

API policy intercepting outgoing HTTP request

38

Page 39: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

API policy intercepting incoming HTTP request

39

Page 40: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

API policy intercepting incoming HTTP request

40

Page 41: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc. 41

1. Motivation and approach

2. Solution overview

3. Interactions

4. Custom components

5. Summary

Page 42: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

All contents © MuleSoft Inc.

Summary

42

1. Implemented API security requirements with custom API policies

2. Encapsulated reusable functionality in custom XML SDK components

a. Code similar to Mule apps

b. Can be reused in Mule apps, custom API policies, …

3. Packaged user properties in token following claims-based identity

a. Encrypted/signed by creator

b. Establishes trust with sender of HTTP request

c. Can be validated without remote calls

d. Allows fine-grained access control to APIs

Page 43: Implementation Advanced Security - Gerald Loeffler · 1. Anypoint Platform comes with API policies for authN and OAuth 2 2. Additional API security requirements: a. User identity

Thank You !