SlideShare uma empresa Scribd logo
1 de 35
Baixar para ler offline
APACHE SLING & FRIENDS TECH MEETUP
2 - 4 SEPTEMBER 2019
Swagger AEM - An OpenAPI Specification For AEM
Cliffano Subagio and Michael Bloch, Shine Solutions Australia
About
2
▪ Cliffano Subagio and Michael Bloch

Consultants at Shine Solutions, Australia

AEM OpenCloud Core Contributors
3
Early challenges with AEM provisioning
Our first ‘AEM on the cloud’ project
4
▪ AEM 5.6 on AWS circa 2013-2014
▪ Infrastructure as code
▪ Cloud: auto-provisioning, auto-recoverable
▪ AEM tooling largely ‘Java-focused’
▪ Sysops teams use of non-Java tools
We were advised to use cURL
5
Integrate this harmless shell script with cURL!
6
set -o errexit
result=$(curl …)
if [[$result = *“error” ]]; then
exit 123
fi
Is it really harmless?
7
set -o errexit
result=$(curl …)
if [[$result = *“error” ]]; then
exit 123
fi
<- Unreliable exit code
<- Fragile error checking
<- Uninformative error result
<- No success result
Problems with AEM Web ‘API’
8
▪ cURL is not always available everywhere
▪ Inconsistent response payload types

JSON, XML, HTML
▪ Unreliable status code

Response 200 on change password error
▪ Lack of integration with various tech stacks

The world has been polyglot for a while
9
What did we do to solve this?
10
We built Swagger AEM
What is Swagger AEM?
11
▪ API specification for AEM endpoints
▪ OpenAPI version 3
▪ OpenAPI Generator
▪ API clients for 30+ languages
OpenAPI specification - metadata
12
OpenAPI specification - path
13
API Clients Generation
14
OpenAPI
Specification

swagger_aem
Ruby API Client

ruby_aem
Resource-oriented

Ruby API Client
Other languages

API Clients…
Python API Client
node.js API Client
Go API Client
What is Ruby AEM?
15
▪ Resource-oriented design Ruby API
▪ Further abstraction from AEM endpoints
▪ Error and response objects
Result handling
16
package = aem.package(‘mygroup’, ‘mypkg’, ‘1.2.3’)

opts = { force: true }

result = package.upload(‘/tmp’, opts)


puts result.message
puts result.response.status_code
puts result.response.body

puts result.response.headers
Error handling
17
begin

package = aem.package(‘mygroup’, ‘mypkg’, ‘1.2.3’)
opts = { force: true }

result = package.upload(‘/tmp’, opts)
rescue RubyAem::Error => err

puts err.message
puts err.result.response.status_code
puts err.result.response.body

puts err.result.response.headers
end
What else can Swagger AEM and Ruby AEM do?
18
▪ Replication, flush, reverse replication agents
▪ Packages, users, groups, paths, nodes
▪ Certificates, truststores, keystores
▪ Resource readiness checks with retries
▪ Many more to add in the future!
19
We also built Swagger AEM OSGI
SAML config with AEM package
20


AEM Developer



System Engineer

Please update SAML provider.
What’s the provider name?
It’s sso-provider-123.
Done. Please test.
Doesn’t work. Any typo?
How about cURL?
21
▪ curl -v -u admin:admin -F 'jcr:primaryType=sling:OsgiConfig' -F
'keyStorePassword="password"' -F 'service.ranking=I"5002"' -F 'idpHttpRedirect=B"true"' -
F 'createUser=B"true"' -F 'defaultRedirectUrl="/sites.html"' -F 'userIDAttribute="NameID"'
-F 'defaultGroups=["content-authors"]' -F 'idpCertAlias="certalias___1471833774937"' -F
'addGroupMemberships=B"true"' -F 'path=["/"]' -F
'synchronizeAttributes=["givenName=profile/givenName,familyName=profile/
familyName,mail=profile/email"]' -F 'clockTolerance=I"60"' -F
'groupMembershipAttribute="http://temp/variable/aem-groups"' -F 'idpUrl="https://
accounts.google.com/o/saml2/idp?idpid=xyz"' -F 'logoutUrl="https://
accounts.google.com/logout"' -F ‘serviceProviderEntityId="AEMSSO"' -F
'handleLogout=B"true"' -F 'spPrivateKeyAlias=""' -F 'useEncryption=B"false"' -F
'nameIdFormat="urn:oasis:names:tc:SAML:2.0:nameid-format:transient"'
What is Swagger AEM OSGI?
22
▪ API specification for AEM OSGI configurations
▪ Converted from Configuration Admin Service
▪ 71k+ lines of generated OpenAPI v3 spec
▪ 12m+ lines of generated API clients
▪ Regenerated for each AEM version
API Clients Generation
23
Configuration
Admin
Service
swagger_aem_osgi
OpenAPI Specification

swagger_aem_osgi
API Clients
In 30+ Languages

Apache Felix Web Console
24
Converted into OpenAPI specification
25
paths:
"/system/console/configMgr/Adaptive Form
post:
parameters:
- name: showPlaceholder
in: query
schema:
type: boolean
- name: maximumCacheEntries
in: query
schema:
type: integer
- name: af.scripting.compatversion
in: query
schema:
type: string
- name: makeFileNameUnique
in: query
schema:
type: boolean
- name: generatingCompliantData
in: query
schema:
type: boolean
operationId: adaptiveFormAndInteractiveCommunicationWebChannelConfigura
tags:
- configmgr
responses:
'200':
description: Successfully retrieved configuration parameters
content:
application/json:
schema:
"$ref": "#/components/schemas/adaptiveFormAndInteractiveCommu
'302':
description: Default response
content:
text/plain:
schema:
type: string
default:
description: Default response
content:
application/json:
schema:
type: string
Converted into Ruby API client code
26
27
Demo: SAML provisioning
Demo
Code flow
28
puppet-aem-resources
ruby_aem
swagger_aem_osgi
OSGI configuration
Provisioning tool
API client
AEM
29
Demo: AEM package installation via voice
Demo
Data flow
30
Install package ABC”
{ “inputs”: [
{ “intent”: “actions.intent.TEXT”,
“rawInputs”: [ {
“inputType”: “VOICE”,
“queryType”: “Install package ABC”
}]}]}
{ "queryText": “Install package ABC",
"parameters": {
"packageName": "ABC"
},
"intent": {
"displayName": “install-package"
}}
/crx/packmgr/service/.json/{path}
200 OK
{
"fulfllmentText”: "Package ABC has been installed”,
"payload”: { "google”: { "richResponse”: { "items”: [
"simpleResponse”: {
"textToSpeech”: "Package ABC has been installed”,
"displayText”: "Package ABC has been installed”,
}]}}}}
"expectedInputs": [
{
"inputPrompt": {
"richInitialPrompt": {
"items": [ { "simpleResponse": {
"textToSpeech": "Package ABC has been installed”
}}]}}}]}
“Package ABC has been installed”
31
In conclusion…
What have we learned?
32
▪ API specifications enable API clients
▪ API clients enable richer integration
▪ AEM provisioning doesn’t have to be

Java-focused
▪ Think outside the box!

Lots of DevOps tools to integrate
Most important of all…
33
You are welcome to join this effort

and contribute to benefit

the wider AEM community!
34
Thank you and any questions ?
Links
35
- https://github.com/shinesolutions/swagger-aem
- https://github.com/shinesolutions/ruby_aem
- https://github.com/shinesolutions/swagger-aem-osgi
- https://github.com/shinesolutions/adaptto-2019-demo
- https://aemopencloud.io/
- https://www.openapis.org/
- https://openapi-generator.tech/

Mais conteúdo relacionado

Mais procurados

ES6 presentation
ES6 presentationES6 presentation
ES6 presentationritika1
 
AEM (CQ) Dispatcher Security and CDN+Browser Caching
AEM (CQ) Dispatcher Security and CDN+Browser CachingAEM (CQ) Dispatcher Security and CDN+Browser Caching
AEM (CQ) Dispatcher Security and CDN+Browser CachingAndrew Khoury
 
Apache Jackrabbit Oak - Scale your content repository to the cloud
Apache Jackrabbit Oak - Scale your content repository to the cloudApache Jackrabbit Oak - Scale your content repository to the cloud
Apache Jackrabbit Oak - Scale your content repository to the cloudRobert Munteanu
 
Sling models by Justin Edelson
Sling models by Justin Edelson Sling models by Justin Edelson
Sling models by Justin Edelson AEM HUB
 
Securing AEM webapps by hacking them
Securing AEM webapps by hacking themSecuring AEM webapps by hacking them
Securing AEM webapps by hacking themMikhail Egorov
 
Spring Framework - AOP
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOPDzmitry Naskou
 
The New JavaScript: ES6
The New JavaScript: ES6The New JavaScript: ES6
The New JavaScript: ES6Rob Eisenberg
 
Server Side Rendering, caching and performance
Server Side Rendering, caching and performanceServer Side Rendering, caching and performance
Server Side Rendering, caching and performanceAteev Chopra
 
Build Your Own CMS with Apache Sling
Build Your Own CMS with Apache SlingBuild Your Own CMS with Apache Sling
Build Your Own CMS with Apache SlingBob Paulin
 
우아한 모노리스
우아한 모노리스우아한 모노리스
우아한 모노리스Arawn Park
 
파이썬 플라스크 이해하기
파이썬 플라스크 이해하기 파이썬 플라스크 이해하기
파이썬 플라스크 이해하기 Yong Joon Moon
 
파이썬 생존 안내서 (자막)
파이썬 생존 안내서 (자막)파이썬 생존 안내서 (자막)
파이썬 생존 안내서 (자막)Heungsub Lee
 
Mikhail Egorov - Hunting for bugs in Adobe Experience Manager webapps
Mikhail Egorov - Hunting for bugs in Adobe Experience Manager webappsMikhail Egorov - Hunting for bugs in Adobe Experience Manager webapps
Mikhail Egorov - Hunting for bugs in Adobe Experience Manager webappshacktivity
 
Debugging concurrency programs in go
Debugging concurrency programs in goDebugging concurrency programs in go
Debugging concurrency programs in goAndrii Soldatenko
 
Hacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sitesHacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sitesMikhail Egorov
 
Hunting for security bugs in AEM webapps
Hunting for security bugs in AEM webappsHunting for security bugs in AEM webapps
Hunting for security bugs in AEM webappsMikhail Egorov
 
Doctrine en dehors des sentiers battus
Doctrine en dehors des sentiers battusDoctrine en dehors des sentiers battus
Doctrine en dehors des sentiers battusRomaric Drigon
 
Visualizing Kafka Security
Visualizing Kafka SecurityVisualizing Kafka Security
Visualizing Kafka SecurityDataWorks Summit
 

Mais procurados (20)

ES6 presentation
ES6 presentationES6 presentation
ES6 presentation
 
AEM (CQ) Dispatcher Security and CDN+Browser Caching
AEM (CQ) Dispatcher Security and CDN+Browser CachingAEM (CQ) Dispatcher Security and CDN+Browser Caching
AEM (CQ) Dispatcher Security and CDN+Browser Caching
 
Apache Jackrabbit Oak - Scale your content repository to the cloud
Apache Jackrabbit Oak - Scale your content repository to the cloudApache Jackrabbit Oak - Scale your content repository to the cloud
Apache Jackrabbit Oak - Scale your content repository to the cloud
 
Sling models by Justin Edelson
Sling models by Justin Edelson Sling models by Justin Edelson
Sling models by Justin Edelson
 
Securing AEM webapps by hacking them
Securing AEM webapps by hacking themSecuring AEM webapps by hacking them
Securing AEM webapps by hacking them
 
Spring Framework - AOP
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOP
 
The New JavaScript: ES6
The New JavaScript: ES6The New JavaScript: ES6
The New JavaScript: ES6
 
Server Side Rendering, caching and performance
Server Side Rendering, caching and performanceServer Side Rendering, caching and performance
Server Side Rendering, caching and performance
 
Build Your Own CMS with Apache Sling
Build Your Own CMS with Apache SlingBuild Your Own CMS with Apache Sling
Build Your Own CMS with Apache Sling
 
우아한 모노리스
우아한 모노리스우아한 모노리스
우아한 모노리스
 
파이썬 플라스크 이해하기
파이썬 플라스크 이해하기 파이썬 플라스크 이해하기
파이썬 플라스크 이해하기
 
파이썬 생존 안내서 (자막)
파이썬 생존 안내서 (자막)파이썬 생존 안내서 (자막)
파이썬 생존 안내서 (자막)
 
NodeJS vs Python.pptx
NodeJS vs Python.pptxNodeJS vs Python.pptx
NodeJS vs Python.pptx
 
Mikhail Egorov - Hunting for bugs in Adobe Experience Manager webapps
Mikhail Egorov - Hunting for bugs in Adobe Experience Manager webappsMikhail Egorov - Hunting for bugs in Adobe Experience Manager webapps
Mikhail Egorov - Hunting for bugs in Adobe Experience Manager webapps
 
Debugging concurrency programs in go
Debugging concurrency programs in goDebugging concurrency programs in go
Debugging concurrency programs in go
 
Hacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sitesHacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sites
 
Hunting for security bugs in AEM webapps
Hunting for security bugs in AEM webappsHunting for security bugs in AEM webapps
Hunting for security bugs in AEM webapps
 
Doctrine en dehors des sentiers battus
Doctrine en dehors des sentiers battusDoctrine en dehors des sentiers battus
Doctrine en dehors des sentiers battus
 
Visualizing Kafka Security
Visualizing Kafka SecurityVisualizing Kafka Security
Visualizing Kafka Security
 
Sling Models Overview
Sling Models OverviewSling Models Overview
Sling Models Overview
 

Semelhante a Swagger AEM - An OpenAPI Specification for AEM

Assurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring frameworkAssurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring frameworkGosuke Miyashita
 
Scaling with Automation
Scaling with AutomationScaling with Automation
Scaling with AutomationUchit Vyas ☁
 
Rapid Infrastructure Provisioning
Rapid Infrastructure ProvisioningRapid Infrastructure Provisioning
Rapid Infrastructure ProvisioningUchit Vyas ☁
 
Flowex - Railway Flow-Based Programming with Elixir GenStage.
Flowex - Railway Flow-Based Programming with Elixir GenStage.Flowex - Railway Flow-Based Programming with Elixir GenStage.
Flowex - Railway Flow-Based Programming with Elixir GenStage.Anton Mishchuk
 
Flowex: Flow-Based Programming with Elixir GenStage - Anton Mishchuk
Flowex: Flow-Based Programming with Elixir GenStage - Anton MishchukFlowex: Flow-Based Programming with Elixir GenStage - Anton Mishchuk
Flowex: Flow-Based Programming with Elixir GenStage - Anton MishchukElixir Club
 
AWS Lambda from the trenches
AWS Lambda from the trenchesAWS Lambda from the trenches
AWS Lambda from the trenchesYan Cui
 
Serverless in Production, an experience report (cloudXchange)
Serverless in Production, an experience report (cloudXchange)Serverless in Production, an experience report (cloudXchange)
Serverless in Production, an experience report (cloudXchange)Yan Cui
 
GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5
GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5
GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5Jeff Larkin
 
Serverless in production, an experience report (LNUG)
Serverless in production, an experience report (LNUG)Serverless in production, an experience report (LNUG)
Serverless in production, an experience report (LNUG)Yan Cui
 
Mасштабирование микросервисов на Go, Matt Heath (Hailo)
Mасштабирование микросервисов на Go, Matt Heath (Hailo)Mасштабирование микросервисов на Go, Matt Heath (Hailo)
Mасштабирование микросервисов на Go, Matt Heath (Hailo)Ontico
 
Let's play with adf 3.0
Let's play with adf 3.0Let's play with adf 3.0
Let's play with adf 3.0Eugenio Romano
 
GoGrid API - Presented at Cloud Connect Event 2010
GoGrid API - Presented at Cloud Connect Event 2010GoGrid API - Presented at Cloud Connect Event 2010
GoGrid API - Presented at Cloud Connect Event 2010GoGrid Cloud Hosting
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreC4Media
 
Google Cloud Endpoints: Building Third-Party APIs on Google AppEngine
Google Cloud Endpoints: Building Third-Party APIs on Google AppEngineGoogle Cloud Endpoints: Building Third-Party APIs on Google AppEngine
Google Cloud Endpoints: Building Third-Party APIs on Google AppEngineRoman Kirillov
 
Pyramid Deployment and Maintenance
Pyramid Deployment and MaintenancePyramid Deployment and Maintenance
Pyramid Deployment and MaintenanceJazkarta, Inc.
 
Simplify your professional web development with symfony
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfonyFrancois Zaninotto
 
Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to javaciklum_ods
 
Node.js API 서버 성능 개선기
Node.js API 서버 성능 개선기Node.js API 서버 성능 개선기
Node.js API 서버 성능 개선기JeongHun Byeon
 

Semelhante a Swagger AEM - An OpenAPI Specification for AEM (20)

Assurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring frameworkAssurer - a pluggable server testing/monitoring framework
Assurer - a pluggable server testing/monitoring framework
 
Scaling with Automation
Scaling with AutomationScaling with Automation
Scaling with Automation
 
Rapid Infrastructure Provisioning
Rapid Infrastructure ProvisioningRapid Infrastructure Provisioning
Rapid Infrastructure Provisioning
 
Flowex - Railway Flow-Based Programming with Elixir GenStage.
Flowex - Railway Flow-Based Programming with Elixir GenStage.Flowex - Railway Flow-Based Programming with Elixir GenStage.
Flowex - Railway Flow-Based Programming with Elixir GenStage.
 
Flowex: Flow-Based Programming with Elixir GenStage - Anton Mishchuk
Flowex: Flow-Based Programming with Elixir GenStage - Anton MishchukFlowex: Flow-Based Programming with Elixir GenStage - Anton Mishchuk
Flowex: Flow-Based Programming with Elixir GenStage - Anton Mishchuk
 
AWS Lambda from the trenches
AWS Lambda from the trenchesAWS Lambda from the trenches
AWS Lambda from the trenches
 
Serverless in Production, an experience report (cloudXchange)
Serverless in Production, an experience report (cloudXchange)Serverless in Production, an experience report (cloudXchange)
Serverless in Production, an experience report (cloudXchange)
 
Ansible best practices
Ansible best practicesAnsible best practices
Ansible best practices
 
GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5
GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5
GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5
 
Serverless in production, an experience report (LNUG)
Serverless in production, an experience report (LNUG)Serverless in production, an experience report (LNUG)
Serverless in production, an experience report (LNUG)
 
Mасштабирование микросервисов на Go, Matt Heath (Hailo)
Mасштабирование микросервисов на Go, Matt Heath (Hailo)Mасштабирование микросервисов на Go, Matt Heath (Hailo)
Mасштабирование микросервисов на Go, Matt Heath (Hailo)
 
Let's play with adf 3.0
Let's play with adf 3.0Let's play with adf 3.0
Let's play with adf 3.0
 
GoGrid API - Presented at Cloud Connect Event 2010
GoGrid API - Presented at Cloud Connect Event 2010GoGrid API - Presented at Cloud Connect Event 2010
GoGrid API - Presented at Cloud Connect Event 2010
 
Lecture: Webpack 4
Lecture: Webpack 4Lecture: Webpack 4
Lecture: Webpack 4
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
 
Google Cloud Endpoints: Building Third-Party APIs on Google AppEngine
Google Cloud Endpoints: Building Third-Party APIs on Google AppEngineGoogle Cloud Endpoints: Building Third-Party APIs on Google AppEngine
Google Cloud Endpoints: Building Third-Party APIs on Google AppEngine
 
Pyramid Deployment and Maintenance
Pyramid Deployment and MaintenancePyramid Deployment and Maintenance
Pyramid Deployment and Maintenance
 
Simplify your professional web development with symfony
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfony
 
Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to java
 
Node.js API 서버 성능 개선기
Node.js API 서버 성능 개선기Node.js API 서버 성능 개선기
Node.js API 서버 성능 개선기
 

Mais de Cliffano Subagio

Cross-Workloads Resource-Level Relationship in AWS
Cross-Workloads Resource-Level Relationship in AWSCross-Workloads Resource-Level Relationship in AWS
Cross-Workloads Resource-Level Relationship in AWSCliffano Subagio
 
AEM OpenCloud Delivery Practices
AEM OpenCloud Delivery PracticesAEM OpenCloud Delivery Practices
AEM OpenCloud Delivery PracticesCliffano Subagio
 
OpenAPI Generator The Babel Fish of The API World - apidays Live Paris
OpenAPI Generator The Babel Fish of The API World - apidays Live ParisOpenAPI Generator The Babel Fish of The API World - apidays Live Paris
OpenAPI Generator The Babel Fish of The API World - apidays Live ParisCliffano Subagio
 
OpenAPI Generator The Babel Fish of The API World - apidays Live Australia
OpenAPI Generator The Babel Fish of The API World - apidays Live AustraliaOpenAPI Generator The Babel Fish of The API World - apidays Live Australia
OpenAPI Generator The Babel Fish of The API World - apidays Live AustraliaCliffano Subagio
 
A Journey to Improve Infrastructure Compliance With InSpec
A Journey to Improve Infrastructure Compliance With InSpecA Journey to Improve Infrastructure Compliance With InSpec
A Journey to Improve Infrastructure Compliance With InSpecCliffano Subagio
 
How to Fit an Infrastructure Platform into Multiple Enterprise Environments
How to Fit an Infrastructure Platform into Multiple Enterprise EnvironmentsHow to Fit an Infrastructure Platform into Multiple Enterprise Environments
How to Fit an Infrastructure Platform into Multiple Enterprise EnvironmentsCliffano Subagio
 
A Quick Look at Accessibility in the World of DevOps
A Quick Look at Accessibility in the World of DevOpsA Quick Look at Accessibility in the World of DevOps
A Quick Look at Accessibility in the World of DevOpsCliffano Subagio
 
Conversation With Your Application Using DialogFlow and CloudFunctions
Conversation With Your Application Using DialogFlow and CloudFunctionsConversation With Your Application Using DialogFlow and CloudFunctions
Conversation With Your Application Using DialogFlow and CloudFunctionsCliffano Subagio
 
Let's Build Voice Assistant Learning Games For Kids
Let's Build Voice Assistant Learning Games For KidsLet's Build Voice Assistant Learning Games For Kids
Let's Build Voice Assistant Learning Games For KidsCliffano Subagio
 
Having A Talk With Jenkins
Having A Talk With JenkinsHaving A Talk With Jenkins
Having A Talk With JenkinsCliffano Subagio
 
AEM Open Cloud - The First Two Years
AEM Open Cloud - The First Two YearsAEM Open Cloud - The First Two Years
AEM Open Cloud - The First Two YearsCliffano Subagio
 
AEM OpenCloud - What's New Since 2.0.0
AEM OpenCloud - What's New Since 2.0.0AEM OpenCloud - What's New Since 2.0.0
AEM OpenCloud - What's New Since 2.0.0Cliffano Subagio
 
Open Source AEM Platform: A Short Intro
Open Source AEM Platform: A Short IntroOpen Source AEM Platform: A Short Intro
Open Source AEM Platform: A Short IntroCliffano Subagio
 
How To Play Music On A Vacuum Cleaner
How To Play Music On A Vacuum CleanerHow To Play Music On A Vacuum Cleaner
How To Play Music On A Vacuum CleanerCliffano Subagio
 
Bringing Jenkins Remote Access API To The Masses
Bringing Jenkins Remote Access API To The MassesBringing Jenkins Remote Access API To The Masses
Bringing Jenkins Remote Access API To The MassesCliffano Subagio
 
Application Deployment Using Ansible
Application Deployment Using AnsibleApplication Deployment Using Ansible
Application Deployment Using AnsibleCliffano Subagio
 
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using JenkinsCliffano Subagio
 
Javascript Everywhere From Nose To Tail
Javascript Everywhere From Nose To TailJavascript Everywhere From Nose To Tail
Javascript Everywhere From Nose To TailCliffano Subagio
 

Mais de Cliffano Subagio (20)

Cross-Workloads Resource-Level Relationship in AWS
Cross-Workloads Resource-Level Relationship in AWSCross-Workloads Resource-Level Relationship in AWS
Cross-Workloads Resource-Level Relationship in AWS
 
AEM OpenCloud Delivery Practices
AEM OpenCloud Delivery PracticesAEM OpenCloud Delivery Practices
AEM OpenCloud Delivery Practices
 
OpenAPI Generator The Babel Fish of The API World - apidays Live Paris
OpenAPI Generator The Babel Fish of The API World - apidays Live ParisOpenAPI Generator The Babel Fish of The API World - apidays Live Paris
OpenAPI Generator The Babel Fish of The API World - apidays Live Paris
 
OpenAPI Generator The Babel Fish of The API World - apidays Live Australia
OpenAPI Generator The Babel Fish of The API World - apidays Live AustraliaOpenAPI Generator The Babel Fish of The API World - apidays Live Australia
OpenAPI Generator The Babel Fish of The API World - apidays Live Australia
 
A Journey to Improve Infrastructure Compliance With InSpec
A Journey to Improve Infrastructure Compliance With InSpecA Journey to Improve Infrastructure Compliance With InSpec
A Journey to Improve Infrastructure Compliance With InSpec
 
How to Fit an Infrastructure Platform into Multiple Enterprise Environments
How to Fit an Infrastructure Platform into Multiple Enterprise EnvironmentsHow to Fit an Infrastructure Platform into Multiple Enterprise Environments
How to Fit an Infrastructure Platform into Multiple Enterprise Environments
 
Introducing AEM OpenCloud
Introducing AEM OpenCloudIntroducing AEM OpenCloud
Introducing AEM OpenCloud
 
A Quick Look at Accessibility in the World of DevOps
A Quick Look at Accessibility in the World of DevOpsA Quick Look at Accessibility in the World of DevOps
A Quick Look at Accessibility in the World of DevOps
 
Conversation With Your Application Using DialogFlow and CloudFunctions
Conversation With Your Application Using DialogFlow and CloudFunctionsConversation With Your Application Using DialogFlow and CloudFunctions
Conversation With Your Application Using DialogFlow and CloudFunctions
 
Let's Build Voice Assistant Learning Games For Kids
Let's Build Voice Assistant Learning Games For KidsLet's Build Voice Assistant Learning Games For Kids
Let's Build Voice Assistant Learning Games For Kids
 
Having A Talk With Jenkins
Having A Talk With JenkinsHaving A Talk With Jenkins
Having A Talk With Jenkins
 
AEM Open Cloud - The First Two Years
AEM Open Cloud - The First Two YearsAEM Open Cloud - The First Two Years
AEM Open Cloud - The First Two Years
 
AEM OpenCloud - What's New Since 2.0.0
AEM OpenCloud - What's New Since 2.0.0AEM OpenCloud - What's New Since 2.0.0
AEM OpenCloud - What's New Since 2.0.0
 
AEM OpenCloud
AEM OpenCloudAEM OpenCloud
AEM OpenCloud
 
Open Source AEM Platform: A Short Intro
Open Source AEM Platform: A Short IntroOpen Source AEM Platform: A Short Intro
Open Source AEM Platform: A Short Intro
 
How To Play Music On A Vacuum Cleaner
How To Play Music On A Vacuum CleanerHow To Play Music On A Vacuum Cleaner
How To Play Music On A Vacuum Cleaner
 
Bringing Jenkins Remote Access API To The Masses
Bringing Jenkins Remote Access API To The MassesBringing Jenkins Remote Access API To The Masses
Bringing Jenkins Remote Access API To The Masses
 
Application Deployment Using Ansible
Application Deployment Using AnsibleApplication Deployment Using Ansible
Application Deployment Using Ansible
 
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using Jenkins
 
Javascript Everywhere From Nose To Tail
Javascript Everywhere From Nose To TailJavascript Everywhere From Nose To Tail
Javascript Everywhere From Nose To Tail
 

Último

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Último (20)

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Swagger AEM - An OpenAPI Specification for AEM

  • 1. APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 Swagger AEM - An OpenAPI Specification For AEM Cliffano Subagio and Michael Bloch, Shine Solutions Australia
  • 2. About 2 ▪ Cliffano Subagio and Michael Bloch
 Consultants at Shine Solutions, Australia
 AEM OpenCloud Core Contributors
  • 3. 3 Early challenges with AEM provisioning
  • 4. Our first ‘AEM on the cloud’ project 4 ▪ AEM 5.6 on AWS circa 2013-2014 ▪ Infrastructure as code ▪ Cloud: auto-provisioning, auto-recoverable ▪ AEM tooling largely ‘Java-focused’ ▪ Sysops teams use of non-Java tools
  • 5. We were advised to use cURL 5
  • 6. Integrate this harmless shell script with cURL! 6 set -o errexit result=$(curl …) if [[$result = *“error” ]]; then exit 123 fi
  • 7. Is it really harmless? 7 set -o errexit result=$(curl …) if [[$result = *“error” ]]; then exit 123 fi <- Unreliable exit code <- Fragile error checking <- Uninformative error result <- No success result
  • 8. Problems with AEM Web ‘API’ 8 ▪ cURL is not always available everywhere ▪ Inconsistent response payload types
 JSON, XML, HTML ▪ Unreliable status code
 Response 200 on change password error ▪ Lack of integration with various tech stacks
 The world has been polyglot for a while
  • 9. 9 What did we do to solve this?
  • 11. What is Swagger AEM? 11 ▪ API specification for AEM endpoints ▪ OpenAPI version 3 ▪ OpenAPI Generator ▪ API clients for 30+ languages
  • 12. OpenAPI specification - metadata 12
  • 14. API Clients Generation 14 OpenAPI Specification
 swagger_aem Ruby API Client
 ruby_aem Resource-oriented
 Ruby API Client Other languages
 API Clients… Python API Client node.js API Client Go API Client
  • 15. What is Ruby AEM? 15 ▪ Resource-oriented design Ruby API ▪ Further abstraction from AEM endpoints ▪ Error and response objects
  • 16. Result handling 16 package = aem.package(‘mygroup’, ‘mypkg’, ‘1.2.3’)
 opts = { force: true }
 result = package.upload(‘/tmp’, opts) 
 puts result.message puts result.response.status_code puts result.response.body
 puts result.response.headers
  • 17. Error handling 17 begin
 package = aem.package(‘mygroup’, ‘mypkg’, ‘1.2.3’) opts = { force: true }
 result = package.upload(‘/tmp’, opts) rescue RubyAem::Error => err
 puts err.message puts err.result.response.status_code puts err.result.response.body
 puts err.result.response.headers end
  • 18. What else can Swagger AEM and Ruby AEM do? 18 ▪ Replication, flush, reverse replication agents ▪ Packages, users, groups, paths, nodes ▪ Certificates, truststores, keystores ▪ Resource readiness checks with retries ▪ Many more to add in the future!
  • 19. 19 We also built Swagger AEM OSGI
  • 20. SAML config with AEM package 20 
 AEM Developer
 
 System Engineer
 Please update SAML provider. What’s the provider name? It’s sso-provider-123. Done. Please test. Doesn’t work. Any typo?
  • 21. How about cURL? 21 ▪ curl -v -u admin:admin -F 'jcr:primaryType=sling:OsgiConfig' -F 'keyStorePassword="password"' -F 'service.ranking=I"5002"' -F 'idpHttpRedirect=B"true"' - F 'createUser=B"true"' -F 'defaultRedirectUrl="/sites.html"' -F 'userIDAttribute="NameID"' -F 'defaultGroups=["content-authors"]' -F 'idpCertAlias="certalias___1471833774937"' -F 'addGroupMemberships=B"true"' -F 'path=["/"]' -F 'synchronizeAttributes=["givenName=profile/givenName,familyName=profile/ familyName,mail=profile/email"]' -F 'clockTolerance=I"60"' -F 'groupMembershipAttribute="http://temp/variable/aem-groups"' -F 'idpUrl="https:// accounts.google.com/o/saml2/idp?idpid=xyz"' -F 'logoutUrl="https:// accounts.google.com/logout"' -F ‘serviceProviderEntityId="AEMSSO"' -F 'handleLogout=B"true"' -F 'spPrivateKeyAlias=""' -F 'useEncryption=B"false"' -F 'nameIdFormat="urn:oasis:names:tc:SAML:2.0:nameid-format:transient"'
  • 22. What is Swagger AEM OSGI? 22 ▪ API specification for AEM OSGI configurations ▪ Converted from Configuration Admin Service ▪ 71k+ lines of generated OpenAPI v3 spec ▪ 12m+ lines of generated API clients ▪ Regenerated for each AEM version
  • 23. API Clients Generation 23 Configuration Admin Service swagger_aem_osgi OpenAPI Specification
 swagger_aem_osgi API Clients In 30+ Languages

  • 24. Apache Felix Web Console 24
  • 25. Converted into OpenAPI specification 25 paths: "/system/console/configMgr/Adaptive Form post: parameters: - name: showPlaceholder in: query schema: type: boolean - name: maximumCacheEntries in: query schema: type: integer - name: af.scripting.compatversion in: query schema: type: string - name: makeFileNameUnique in: query schema: type: boolean - name: generatingCompliantData in: query schema: type: boolean operationId: adaptiveFormAndInteractiveCommunicationWebChannelConfigura tags: - configmgr responses: '200': description: Successfully retrieved configuration parameters content: application/json: schema: "$ref": "#/components/schemas/adaptiveFormAndInteractiveCommu '302': description: Default response content: text/plain: schema: type: string default: description: Default response content: application/json: schema: type: string
  • 26. Converted into Ruby API client code 26
  • 29. 29 Demo: AEM package installation via voice Demo
  • 30. Data flow 30 Install package ABC” { “inputs”: [ { “intent”: “actions.intent.TEXT”, “rawInputs”: [ { “inputType”: “VOICE”, “queryType”: “Install package ABC” }]}]} { "queryText": “Install package ABC", "parameters": { "packageName": "ABC" }, "intent": { "displayName": “install-package" }} /crx/packmgr/service/.json/{path} 200 OK { "fulfllmentText”: "Package ABC has been installed”, "payload”: { "google”: { "richResponse”: { "items”: [ "simpleResponse”: { "textToSpeech”: "Package ABC has been installed”, "displayText”: "Package ABC has been installed”, }]}}}} "expectedInputs": [ { "inputPrompt": { "richInitialPrompt": { "items": [ { "simpleResponse": { "textToSpeech": "Package ABC has been installed” }}]}}}]} “Package ABC has been installed”
  • 32. What have we learned? 32 ▪ API specifications enable API clients ▪ API clients enable richer integration ▪ AEM provisioning doesn’t have to be
 Java-focused ▪ Think outside the box!
 Lots of DevOps tools to integrate
  • 33. Most important of all… 33 You are welcome to join this effort
 and contribute to benefit
 the wider AEM community!
  • 34. 34 Thank you and any questions ?
  • 35. Links 35 - https://github.com/shinesolutions/swagger-aem - https://github.com/shinesolutions/ruby_aem - https://github.com/shinesolutions/swagger-aem-osgi - https://github.com/shinesolutions/adaptto-2019-demo - https://aemopencloud.io/ - https://www.openapis.org/ - https://openapi-generator.tech/