SlideShare una empresa de Scribd logo
1 de 35
Descargar para leer sin conexión
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/

Más contenido relacionado

La actualidad más candente

Java 8 presentation
Java 8 presentationJava 8 presentation
Java 8 presentationVan Huong
 
Docker Security and Content Trust
Docker Security and Content TrustDocker Security and Content Trust
Docker Security and Content Trustehazlett
 
How to Automate API Testing
How to Automate API TestingHow to Automate API Testing
How to Automate API TestingBruno Pedro
 
What is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | EdurekaWhat is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | EdurekaEdureka!
 
Service Workers and APEX
Service Workers and APEXService Workers and APEX
Service Workers and APEXDimitri Gielis
 
Schema-First API Design
Schema-First API DesignSchema-First API Design
Schema-First API DesignYos Riady
 
REST API Design & Development
REST API Design & DevelopmentREST API Design & Development
REST API Design & DevelopmentAshok Pundit
 
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...Postman
 
B4USolution_API-Testing
B4USolution_API-TestingB4USolution_API-Testing
B4USolution_API-Testingb4usolution .
 
Hacking and Defending APIs - Red and Blue make Purple.pdf
Hacking and Defending APIs - Red and Blue make Purple.pdfHacking and Defending APIs - Red and Blue make Purple.pdf
Hacking and Defending APIs - Red and Blue make Purple.pdfMatt Tesauro
 
Securing AEM webapps by hacking them
Securing AEM webapps by hacking themSecuring AEM webapps by hacking them
Securing AEM webapps by hacking themMikhail Egorov
 
API Testing. Streamline your testing process.
API Testing. Streamline your testing process.API Testing. Streamline your testing process.
API Testing. Streamline your testing process.Andrey Oleynik
 
Hacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sitesHacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sitesMikhail Egorov
 
API Test Automation
API Test Automation API Test Automation
API Test Automation SQALab
 

La actualidad más candente (20)

Java 8 presentation
Java 8 presentationJava 8 presentation
Java 8 presentation
 
Docker Security and Content Trust
Docker Security and Content TrustDocker Security and Content Trust
Docker Security and Content Trust
 
Graphql
GraphqlGraphql
Graphql
 
How to Automate API Testing
How to Automate API TestingHow to Automate API Testing
How to Automate API Testing
 
What is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | EdurekaWhat is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | Edureka
 
Service Workers and APEX
Service Workers and APEXService Workers and APEX
Service Workers and APEX
 
Schema-First API Design
Schema-First API DesignSchema-First API Design
Schema-First API Design
 
REST API Design & Development
REST API Design & DevelopmentREST API Design & Development
REST API Design & Development
 
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
 
API Testing
API TestingAPI Testing
API Testing
 
B4USolution_API-Testing
B4USolution_API-TestingB4USolution_API-Testing
B4USolution_API-Testing
 
Postman
PostmanPostman
Postman
 
Api presentation
Api presentationApi presentation
Api presentation
 
Hacking and Defending APIs - Red and Blue make Purple.pdf
Hacking and Defending APIs - Red and Blue make Purple.pdfHacking and Defending APIs - Red and Blue make Purple.pdf
Hacking and Defending APIs - Red and Blue make Purple.pdf
 
Securing AEM webapps by hacking them
Securing AEM webapps by hacking themSecuring AEM webapps by hacking them
Securing AEM webapps by hacking them
 
API Testing. Streamline your testing process.
API Testing. Streamline your testing process.API Testing. Streamline your testing process.
API Testing. Streamline your testing process.
 
Api testing
Api testingApi testing
Api testing
 
What is Swagger?
What is Swagger?What is Swagger?
What is Swagger?
 
Hacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sitesHacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sites
 
API Test Automation
API Test Automation API Test Automation
API Test Automation
 

Similar 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
 

Similar 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 서버 성능 개선기
 

Más 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
 

Más 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

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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
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
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
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
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
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
 

Último (20)

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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 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/