31

CIS14: Building a Plug-in with the PingAccess SDK

Embed Size (px)

DESCRIPTION

Hands-on opportunity to build your own plug-in, using the PingAccess 3.0 SDK, to solve your Web Application/API Access Management challenges, and walk away with a an evaluation copy of the Ping Identity WAM solution and the custom plug-in that you built.

Citation preview

Page 1: CIS14: Building a Plug-in with the PingAccess SDK
Page 2: CIS14: Building a Plug-in with the PingAccess SDK

BUILDING A PLUG-IN WITH THE PINGACCESS SDK

Jason Musgrave

Senior Software Engineer

Copyright © 2014 Ping Identity Corp. All rights reserved. 2

Page 3: CIS14: Building a Plug-in with the PingAccess SDK

Me

Copyright © 2014 Ping Identity Corp. All rights reserved. 3

Image: Apple II tranparent 800 / CC-BY-SA-2.0-fr / Devin Cook (editing) Rama & Musée Bolo - Own work

Page 4: CIS14: Building a Plug-in with the PingAccess SDK

Web & API Access Management

Copyright © 2014 Ping Identity Corp. All rights reserved. 4

Page 5: CIS14: Building a Plug-in with the PingAccess SDK

APIs vs SDKs

Copyright © 2014 Ping Identity Corp. All rights reserved. 5

Page 6: CIS14: Building a Plug-in with the PingAccess SDK

APIs vs SDKs

Copyright © 2014 Ping Identity Corp. All rights reserved. 6

Page 7: CIS14: Building a Plug-in with the PingAccess SDK

Tooling

Copyright © 2014 Ping Identity Corp. All rights reserved. 7

• Java 7 (or 8)

• Git 1.8.x

• Maven 3.x

Page 8: CIS14: Building a Plug-in with the PingAccess SDK

Via Maven http://maven.pingidentity.com/release/

Copyright © 2014 Ping Identity Corp. All rights reserved. 8

How to access?

Via the Install {PA-INSTALL-PATH}/sdk/samples/README.md

<dependency> <groupId>com.pingidentity.pingaccess</groupId> <artifactId>pingaccess-sdk</artifactId> <version>3.0.0</version>

</dependency>

Page 9: CIS14: Building a Plug-in with the PingAccess SDK

Flashdrive

Copyright © 2014 Ping Identity Corp. All rights reserved. 9

•  Clone of Git Repo –  Markdown Instructions –  Sample

•  PingAccess –  SDK

•  License •  demo-simple-webapp

Page 10: CIS14: Building a Plug-in with the PingAccess SDK

Git repo before / after

Copyright © 2014 Ping Identity Corp. All rights reserved. 10

https://github.com/pingidentity/CIS-2014-PingAccess-3.0-SDK-Demo

• Branches – master

– BEGIN

– RENDERUI

– CONFIGURE

Page 11: CIS14: Building a Plug-in with the PingAccess SDK

What’s in the SDK?

Copyright © 2014 Ping Identity Corp. All rights reserved. 11

SDKTransactional

Rule Site Authenticator

UI

Render HttpConfig UserData

Page 12: CIS14: Building a Plug-in with the PingAccess SDK

Http?

Copyright © 2014 Ping Identity Corp. All rights reserved. 12

What about

javax.servlet.http.HttpServletRequest?

Page 13: CIS14: Building a Plug-in with the PingAccess SDK

Copyright © 2014 Ping Identity Corp. All rights reserved. 13

com.pingidentity.pa.sdk.http

Request

Response

Exchange

Header

HeaderFields

Body

Header

HeaderFields

Body

Page 14: CIS14: Building a Plug-in with the PingAccess SDK

What’s A Rule?

Copyright © 2014 Ping Identity Corp. All rights reserved. 14

Page 15: CIS14: Building a Plug-in with the PingAccess SDK

What’s A Rule?

Copyright © 2014 Ping Identity Corp. All rights reserved. 15

Page 16: CIS14: Building a Plug-in with the PingAccess SDK

What

Copyright © 2014 Ping Identity Corp. All rights reserved. 16

Page 17: CIS14: Building a Plug-in with the PingAccess SDK

Describe

Copyright © 2014 Ping Identity Corp. All rights reserved. 17

Page 18: CIS14: Building a Plug-in with the PingAccess SDK

Save

Copyright © 2014 Ping Identity Corp. All rights reserved. 18

Page 19: CIS14: Building a Plug-in with the PingAccess SDK

Describe / Configure / Validate

Copyright © 2014 Ping Identity Corp. All rights reserved. 19

•  Describe à Annotations or Builder –  com.pingidentity.pa.sdk.ui.UIElement –  com.pingidentity.pa.sdk.ui.ConfigurationBuilder

•  Configure à Jackson Mapping and Lifecycle methods.

•  Validate à javax.validation.Constraint

Page 20: CIS14: Building a Plug-in with the PingAccess SDK

Describe / Configure / Validate

Copyright © 2014 Ping Identity Corp. All rights reserved. 20

Page 21: CIS14: Building a Plug-in with the PingAccess SDK

Execute: handleRequest / handleResponse

Copyright © 2014 Ping Identity Corp. All rights reserved. 21

Page 22: CIS14: Building a Plug-in with the PingAccess SDK

DEMO PingAccess SDK

Copyright © 2014 Ping Identity Corp. All rights reserved. 22

Page 23: CIS14: Building a Plug-in with the PingAccess SDK

git checkout BEGIN

Copyright © 2014 Ping Identity Corp. All rights reserved. 23

Page 24: CIS14: Building a Plug-in with the PingAccess SDK

Annotate Rule

Copyright © 2014 Ping Identity Corp. All rights reserved. 24

Page 25: CIS14: Building a Plug-in with the PingAccess SDK

Build Configuration Class

Copyright © 2014 Ping Identity Corp. All rights reserved. 25

Page 26: CIS14: Building a Plug-in with the PingAccess SDK

ConfigurationBuilder from()

Copyright © 2014 Ping Identity Corp. All rights reserved. 26

Page 27: CIS14: Building a Plug-in with the PingAccess SDK

Expected Configuration

Copyright © 2014 Ping Identity Corp. All rights reserved. 27

Page 28: CIS14: Building a Plug-in with the PingAccess SDK

Configure & Initialization

Copyright © 2014 Ping Identity Corp. All rights reserved. 28

Page 29: CIS14: Building a Plug-in with the PingAccess SDK

Handle Request

Copyright © 2014 Ping Identity Corp. All rights reserved. 29

Page 30: CIS14: Building a Plug-in with the PingAccess SDK

Error Callback

Copyright © 2014 Ping Identity Corp. All rights reserved. 30

Page 31: CIS14: Building a Plug-in with the PingAccess SDK