Connect Intergration Patterns: A Case Study - Patrick Streule

Preview:

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.

Citation preview

#atlassian

PATRICK STREULE • CONNECT ARCHITECT • ATLASSIAN • @PSTREULE

Connect Integration PatternsA Case Study

Connect Refresher

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

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

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" }] } }

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

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

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

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

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

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

From Add-Ons to Integrations

Add-Ons

Add-OnConnect

Integration Add-Ons

Add-OnConnect

Application

Integration Add-Ons

Add-OnConnect

Application

Application

Add-On

Authentication

Authentication

Add-OnConnect

Application

JWT

Authentication

Add-OnConnect

Application

JWT

Authentication: Service Account

Add-On Application

JWT API KeyAuth TokenBasic Auth

Example: Bitbucket Notifications in HipChat

Example: Bitbucket Notifications in HipChat

Example: Bitbucket Notifications in HipChat

Example: Bitbucket Notifications in HipChat

Example: Bitbucket Notifications in HipChat

Example: Bitbucket Notifications in HipChat

Installed in Bitbucket and HipChat

Add-On

bb-addon.jsonhc-addon.json

Installed in Bitbucket and HipChat

Add-On

bb-addon.jsonhc-addon.json

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

Installed in Bitbucket and HipChat

Add-On

bb-addon.jsonhc-addon.json

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

1

1

2

2/installed

Installed in Bitbucket and HipChat

Add-On

bb-addon.jsonhc-addon.json

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

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

1

1

2

2/installed

Installed in Bitbucket and HipChat

Add-On

bb-addon.jsonhc-addon.json

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

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

/config1

1

2

2/installed

Installed in Bitbucket and HipChat

Add-On

bb-addon.jsonhc-addon.json

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

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

/config1

1

2

2/installed

Authentication: Multiple Service Accounts

Add-On

1

2

1

2

bb-addon.jsonhc-addon.json

Authentication: Multiple Service Accounts

Add-On

1

2

1

2

bb-addon.jsonhc-addon.json

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

Authentication: Multiple Service Accounts

Add-On

1

2

1

2

bb-addon.jsonhc-addon.json

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

Authentication: Multiple Service Accounts

Add-On

1

2

1

2

bb-addon.jsonhc-addon.json

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

/events

Authentication: Multiple Service Accounts

Add-On

1

2

1

2

bb-addon.jsonhc-addon.json

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

/events

JWT

Authentication: Multiple Service Accounts

Add-On

1

2

1

2

bb-addon.jsonhc-addon.json

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

/events

JWT

Authentication: Multiple Service Accounts

Add-On

1

2

1

2

bb-addon.jsonhc-addon.json

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

/events

JWT Group

Authentication: Multiple Service Accounts

Add-On

1

2

1

2

bb-addon.jsonhc-addon.json

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

/events

JWT Group

AuthToken

2

Authentication: Mapped User Accounts (3LA)

Add-On Application

JWTAghJ87s

l9JUYfsg

?

Authentication: Mapped User Accounts (3LA)

Add-On Application

JWTAghJ87s

l9JUYfsg

?

Authentication: Mapped User Accounts (3LA)

Add-On Application

JWTAghJ87s

l9JUYfsg

?

Authentication: Mapped User Accounts (3LA)

Add-On Application

JWT NPcudk7

AghJ87s

l9JUYfsg

Authentication: Mapped User Accounts (3LA)

Add-On Application

JWT NPcudk7

AghJ87s

l9JUYfsg Auth Token

NPcudk7

Get Started Today!

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

Private listing

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

allowed installs

Thank you!

PATRICK STREULE • CONNECT ARCHITECT • ATLASSIAN • @PSTREULE