Connect Intergration Patterns: A Case Study - Patrick Streule

49
#atlassian

description

Learn how Atlassian Connect can help you to integrate JIRA and Confluence with custom services and third-party software. We will preview how Atlassian used Connect to integrate Bitbucket and HipChat.

Transcript of Connect Intergration Patterns: A Case Study - Patrick Streule

Page 1: Connect Intergration Patterns: A Case Study - Patrick Streule

#atlassian

Page 2: Connect Intergration Patterns: A Case Study - Patrick Streule

PATRICK STREULE • CONNECT ARCHITECT • ATLASSIAN • @PSTREULE

Connect Integration PatternsA Case Study

Page 3: Connect Intergration Patterns: A Case Study - Patrick Streule

Connect Refresher

Page 4: Connect Intergration Patterns: A Case Study - Patrick Streule

C O N N E C T R E F R E S H E R

Atlassian Plug-ins

Add-On

• In Process• Resources are shared• Access to all data

• Tied to the stack• Language

• FrameworksAdd-On

Page 5: Connect Intergration Patterns: A Case Study - Patrick Streule

C O N N E C T R E F R E S H E R

Connect Add-Ons

Add-On

• Separate Process• Scales independently• Data access only through

REST API

• Choose your own stack• Language

• FrameworksAdd-On

Connect HTTPS

Page 6: Connect Intergration Patterns: A Case Study - Patrick Streule

C O N N E C T R E F R E S H E R

Simple Descriptor{ "key": "my-add-on", "name": "Ping Pong", "description": "My very first add-on", "baseUrl": "{{localBaseUrl}}", "authentication": { "type": "jwt" }, "lifecycle": { "installed": "/installed" }, "modules": { "generalPages": [{ "key": "hello-world-page-jira", "location": "system.top.navigation.bar", "name": { "value": "Hello World" }, "url": "/hello-world" }] } }

Page 7: Connect Intergration Patterns: A Case Study - Patrick Streule

C O N N E C T R E F R E S H E R

Simple Descriptor{ "key": "my-add-on", "name": "Ping Pong", "description": "My very first add-on", "baseUrl": "{{localBaseUrl}}", "authentication": { "type": "jwt" }, "lifecycle": { "installed": "/installed" }, "modules": { "generalPages": [{ "key": "hello-world-page-jira", "location": "system.top.navigation.bar", "name": { "value": "Hello World" }, "url": "/hello-world" }] } }

Add-on service location

Page 8: Connect Intergration Patterns: A Case Study - Patrick Streule

C O N N E C T R E F R E S H E R

Simple Descriptor{ "key": "my-add-on", "name": "Ping Pong", "description": "My very first add-on", "baseUrl": "{{localBaseUrl}}", "authentication": { "type": "jwt" }, "lifecycle": { "installed": "/installed" }, "modules": { "generalPages": [{ "key": "hello-world-page-jira", "location": "system.top.navigation.bar", "name": { "value": "Hello World" }, "url": "/hello-world" }] } }

How to auth calls

Add-on service location

Page 9: Connect Intergration Patterns: A Case Study - Patrick Streule

C O N N E C T R E F R E S H E R

Simple Descriptor{ "key": "my-add-on", "name": "Ping Pong", "description": "My very first add-on", "baseUrl": "{{localBaseUrl}}", "authentication": { "type": "jwt" }, "lifecycle": { "installed": "/installed" }, "modules": { "generalPages": [{ "key": "hello-world-page-jira", "location": "system.top.navigation.bar", "name": { "value": "Hello World" }, "url": "/hello-world" }] } }

How to auth calls

Lifecycle notification endpoints

Add-on service location

Page 10: Connect Intergration Patterns: A Case Study - Patrick Streule

C O N N E C T R E F R E S H E R

Simple Descriptor{ "key": "my-add-on", "name": "Ping Pong", "description": "My very first add-on", "baseUrl": "{{localBaseUrl}}", "authentication": { "type": "jwt" }, "lifecycle": { "installed": "/installed" }, "modules": { "generalPages": [{ "key": "hello-world-page-jira", "location": "system.top.navigation.bar", "name": { "value": "Hello World" }, "url": "/hello-world" }] } }

Where is the add-on

showing up?

How to auth calls

Lifecycle notification endpoints

Add-on service location

Page 11: Connect Intergration Patterns: A Case Study - Patrick Streule

C O N N E C T R E F R E S H E R

Simple Descriptor{ "key": "my-add-on", "name": "Ping Pong", "description": "My very first add-on", "baseUrl": "{{localBaseUrl}}", "authentication": { "type": "jwt" }, "lifecycle": { "installed": "/installed" }, "modules": { "generalPages": [{ "key": "hello-world-page-jira", "location": "system.top.navigation.bar", "name": { "value": "Hello World" }, "url": "/hello-world" }] } }

Where is the add-on

showing up?

iFrame URL

How to auth calls

Lifecycle notification endpoints

Add-on service location

Page 12: Connect Intergration Patterns: A Case Study - Patrick Streule

C O N N E C T R E F R E S H E R

Product WEBHOOKS

REST API

REST API

HTTP

Add-On

Page 13: Connect Intergration Patterns: A Case Study - Patrick Streule

From Add-Ons to Integrations

Page 14: Connect Intergration Patterns: A Case Study - Patrick Streule

Add-Ons

Add-OnConnect

Page 15: Connect Intergration Patterns: A Case Study - Patrick Streule

Integration Add-Ons

Add-OnConnect

Application

Page 16: Connect Intergration Patterns: A Case Study - Patrick Streule

Integration Add-Ons

Add-OnConnect

Application

Application

Add-On

Page 17: Connect Intergration Patterns: A Case Study - Patrick Streule

Authentication

Page 18: Connect Intergration Patterns: A Case Study - Patrick Streule

Authentication

Add-OnConnect

Application

JWT

Page 19: Connect Intergration Patterns: A Case Study - Patrick Streule

Authentication

Add-OnConnect

Application

JWT

Page 20: Connect Intergration Patterns: A Case Study - Patrick Streule

Authentication: Service Account

Add-On Application

JWT API KeyAuth TokenBasic Auth

Page 21: Connect Intergration Patterns: A Case Study - Patrick Streule

Example: Bitbucket Notifications in HipChat

Page 22: Connect Intergration Patterns: A Case Study - Patrick Streule

Example: Bitbucket Notifications in HipChat

Page 23: Connect Intergration Patterns: A Case Study - Patrick Streule

Example: Bitbucket Notifications in HipChat

Page 24: Connect Intergration Patterns: A Case Study - Patrick Streule

Example: Bitbucket Notifications in HipChat

Page 25: Connect Intergration Patterns: A Case Study - Patrick Streule

Example: Bitbucket Notifications in HipChat

Page 26: Connect Intergration Patterns: A Case Study - Patrick Streule

Example: Bitbucket Notifications in HipChat

Page 27: Connect Intergration Patterns: A Case Study - Patrick Streule

Installed in Bitbucket and HipChat

Add-On

bb-addon.jsonhc-addon.json

Page 28: Connect Intergration Patterns: A Case Study - Patrick Streule

Installed in Bitbucket and HipChat

Add-On

bb-addon.jsonhc-addon.json

"installable": { "callbackUrl": "/installed" }

Page 29: Connect Intergration Patterns: A Case Study - Patrick Streule

Installed in Bitbucket and HipChat

Add-On

bb-addon.jsonhc-addon.json

"installable": { "callbackUrl": "/installed" }

1

1

2

2/installed

Page 30: Connect Intergration Patterns: A Case Study - Patrick Streule

Installed in Bitbucket and HipChat

Add-On

bb-addon.jsonhc-addon.json

"configurePage": { "url": "/config" }

"installable": { "callbackUrl": "/installed" }

1

1

2

2/installed

Page 31: Connect Intergration Patterns: A Case Study - Patrick Streule

Installed in Bitbucket and HipChat

Add-On

bb-addon.jsonhc-addon.json

"configurePage": { "url": "/config" }

"installable": { "callbackUrl": "/installed" }

/config1

1

2

2/installed

Page 32: Connect Intergration Patterns: A Case Study - Patrick Streule

Installed in Bitbucket and HipChat

Add-On

bb-addon.jsonhc-addon.json

"configurePage": { "url": "/config" }

"installable": { "callbackUrl": "/installed" }

/config1

1

2

2/installed

Page 33: Connect Intergration Patterns: A Case Study - Patrick Streule

Authentication: Multiple Service Accounts

Add-On

1

2

1

2

bb-addon.jsonhc-addon.json

Page 34: Connect Intergration Patterns: A Case Study - Patrick Streule

Authentication: Multiple Service Accounts

Add-On

1

2

1

2

bb-addon.jsonhc-addon.json

"webhooks": [ { "event": "*", "url": "/events" } ]

Page 35: Connect Intergration Patterns: A Case Study - Patrick Streule

Authentication: Multiple Service Accounts

Add-On

1

2

1

2

bb-addon.jsonhc-addon.json

"webhooks": [ { "event": "*", "url": "/events" } ]

Page 36: Connect Intergration Patterns: A Case Study - Patrick Streule

Authentication: Multiple Service Accounts

Add-On

1

2

1

2

bb-addon.jsonhc-addon.json

"webhooks": [ { "event": "*", "url": "/events" } ]

/events

Page 37: Connect Intergration Patterns: A Case Study - Patrick Streule

Authentication: Multiple Service Accounts

Add-On

1

2

1

2

bb-addon.jsonhc-addon.json

"webhooks": [ { "event": "*", "url": "/events" } ]

/events

JWT

Page 38: Connect Intergration Patterns: A Case Study - Patrick Streule

Authentication: Multiple Service Accounts

Add-On

1

2

1

2

bb-addon.jsonhc-addon.json

"webhooks": [ { "event": "*", "url": "/events" } ]

/events

JWT

Page 39: Connect Intergration Patterns: A Case Study - Patrick Streule

Authentication: Multiple Service Accounts

Add-On

1

2

1

2

bb-addon.jsonhc-addon.json

"webhooks": [ { "event": "*", "url": "/events" } ]

/events

JWT Group

Page 40: Connect Intergration Patterns: A Case Study - Patrick Streule

Authentication: Multiple Service Accounts

Add-On

1

2

1

2

bb-addon.jsonhc-addon.json

"webhooks": [ { "event": "*", "url": "/events" } ]

/events

JWT Group

AuthToken

2

Page 41: Connect Intergration Patterns: A Case Study - Patrick Streule

Authentication: Mapped User Accounts (3LA)

Add-On Application

JWTAghJ87s

l9JUYfsg

?

Page 42: Connect Intergration Patterns: A Case Study - Patrick Streule

Authentication: Mapped User Accounts (3LA)

Add-On Application

JWTAghJ87s

l9JUYfsg

?

Page 43: Connect Intergration Patterns: A Case Study - Patrick Streule

Authentication: Mapped User Accounts (3LA)

Add-On Application

JWTAghJ87s

l9JUYfsg

?

Page 44: Connect Intergration Patterns: A Case Study - Patrick Streule

Authentication: Mapped User Accounts (3LA)

Add-On Application

JWT NPcudk7

AghJ87s

l9JUYfsg

Page 45: Connect Intergration Patterns: A Case Study - Patrick Streule

Authentication: Mapped User Accounts (3LA)

Add-On Application

JWT NPcudk7

AghJ87s

l9JUYfsg Auth Token

NPcudk7

Page 46: Connect Intergration Patterns: A Case Study - Patrick Streule

Get Started Today!

Page 47: Connect Intergration Patterns: A Case Study - Patrick Streule

Get Started

Dev Loop

• Learn: https://connect.atlassian.com• Create your JSON descriptor• Create your add-on service• Host and test locally

P R O D U C T I O N

L O C A L

S TA G I N G

• Create private Marketplace listing• Deploy add-on to a staging environment• Test add-on on a Cloud JIRA or Confluence instance

• Deploy add-on to a production environment

Page 48: Connect Intergration Patterns: A Case Study - Patrick Streule

Private listing

• Not visible for others• Version management• Tokens to control

allowed installs

Page 49: Connect Intergration Patterns: A Case Study - Patrick Streule

Thank you!

PATRICK STREULE • CONNECT ARCHITECT • ATLASSIAN • @PSTREULE