SlideShare une entreprise Scribd logo
1  sur  25
Télécharger pour lire hors ligne
How to Use Zimbra SOAP API
by: Imam Omar mochtar
kopdarZimbraID#1
31-08-2019 @kedaiJadoel
> whoami
● Father of one beloved daughter and wife (for now).
● Working as IT consultant with “PALUGADA” oriented.
● Love to Code, commonly Python chosen as my swiss army knife.
● Hold several IT certificates one of them is Zimbra Admin.
What Is SOAP anyway ?
and how it related to
Zimbra ?
SOAP (Simple Object Access Protocol)
● (Old) A Web Service.
● Through HTTP and POST method to exchange the data.
● Commonly using XML for message format.
*In a glance
Example
Request Response
SOAP in Zimbra
Preparation
1. RTFM
2. See How to Compose and Receive the Payload
3. Get SOAP End Point
● Admin namespace
https://[SERVER]/:7071/service/admin/soap
● Non admin namespace
https://[SERVER]/service/soap
Under the hood
4. Choose the Arsenal (HTTP Client)
Using Zimbra API
1. Get the token
Request
Response
Login
Token
Lifetime in milliseconds, 12 hours as default
Namespace
Note:
● You can extend token lifetime by modify
zimbraAdminAuthTokenLifetime
● zmprov using zimbra_user and
zimbra_ldap_password for login
● We will use token for next request, if it was
expired then refetch again.
Hint: you can use JSON though
Hint: you can use JSON though (cont’d)
Note:
● Set Content-Type header to application/json.
● The returned content also as JSON.
2. Add Payload and Set Token in Header
Token
Hint: zmsoap can be useful
Note:
● Use argument -vv to print out the SOAP request and response.
● You can also change the format to JSON instead XML by argument --json.
● -z is for authenticated as admin, you can specify user & password too by -a for user
and -p for password.
● Use -t to specify the scoop / namespace, the default is admin.
● Set “as user” by using argument -m.
Demo
1. Scripting, Usecase: Bulk Set User Attributes and Renaming Account.
The sequences are:
1. Loop through csv file, first column is existing email, the second one is new email.
2. Make sure the account is exist.
3. Rename account for prevent duplicated account while in process.
4. Add existing email as alias.
5. Set existing email in canonical address (outgoing email masking).
6. Rename account to actual new email.
Hint: Java is Fast But it Slow to Start.
It’s Fast brah ….
2. Identity and Access Management (IAM) Integration.
Question ?
Contact:
iomarmochtar@gmail.com
iomarmochtar (github, telegram)
Blog:
https://blog.mochtar.net

Contenu connexe

Tendances

Tendances (20)

codecentric AG: CQRS and Event Sourcing Applications with Cassandra
codecentric AG: CQRS and Event Sourcing Applications with Cassandracodecentric AG: CQRS and Event Sourcing Applications with Cassandra
codecentric AG: CQRS and Event Sourcing Applications with Cassandra
 
Evading Microsoft ATA for Active Directory Domination
Evading Microsoft ATA for Active Directory DominationEvading Microsoft ATA for Active Directory Domination
Evading Microsoft ATA for Active Directory Domination
 
Deep Dive on ClickHouse Sharding and Replication-2202-09-22.pdf
Deep Dive on ClickHouse Sharding and Replication-2202-09-22.pdfDeep Dive on ClickHouse Sharding and Replication-2202-09-22.pdf
Deep Dive on ClickHouse Sharding and Replication-2202-09-22.pdf
 
Cyber forensics lab 4
Cyber forensics lab 4Cyber forensics lab 4
Cyber forensics lab 4
 
Galene - LinkedIn's Search Architecture: Presented by Diego Buthay & Sriram S...
Galene - LinkedIn's Search Architecture: Presented by Diego Buthay & Sriram S...Galene - LinkedIn's Search Architecture: Presented by Diego Buthay & Sriram S...
Galene - LinkedIn's Search Architecture: Presented by Diego Buthay & Sriram S...
 
CISSP - Chapter 3 - Cryptography
CISSP - Chapter 3 - CryptographyCISSP - Chapter 3 - Cryptography
CISSP - Chapter 3 - Cryptography
 
Apache Flink in the Cloud-Native Era
Apache Flink in the Cloud-Native EraApache Flink in the Cloud-Native Era
Apache Flink in the Cloud-Native Era
 
Data Warehouses in Kubernetes Visualized: the ClickHouse Kubernetes Operator UI
Data Warehouses in Kubernetes Visualized: the ClickHouse Kubernetes Operator UIData Warehouses in Kubernetes Visualized: the ClickHouse Kubernetes Operator UI
Data Warehouses in Kubernetes Visualized: the ClickHouse Kubernetes Operator UI
 
Log Analysis
Log AnalysisLog Analysis
Log Analysis
 
Virtual Flink Forward 2020: Autoscaling Flink at Netflix - Timothy Farkas
Virtual Flink Forward 2020: Autoscaling Flink at Netflix - Timothy FarkasVirtual Flink Forward 2020: Autoscaling Flink at Netflix - Timothy Farkas
Virtual Flink Forward 2020: Autoscaling Flink at Netflix - Timothy Farkas
 
What's the time? ...and why? (Mattias Sax, Confluent) Kafka Summit SF 2019
What's the time? ...and why? (Mattias Sax, Confluent) Kafka Summit SF 2019What's the time? ...and why? (Mattias Sax, Confluent) Kafka Summit SF 2019
What's the time? ...and why? (Mattias Sax, Confluent) Kafka Summit SF 2019
 
AWS re:Invent 2016: Migrating Your Data Warehouse to Amazon Redshift (DAT202)
AWS re:Invent 2016: Migrating Your Data Warehouse to Amazon Redshift (DAT202)AWS re:Invent 2016: Migrating Your Data Warehouse to Amazon Redshift (DAT202)
AWS re:Invent 2016: Migrating Your Data Warehouse to Amazon Redshift (DAT202)
 
Threat Hunting Web Shells Using Splunk
Threat Hunting Web Shells Using SplunkThreat Hunting Web Shells Using Splunk
Threat Hunting Web Shells Using Splunk
 
Unified Data Platform, by Pauline Yeung of Cisco Systems
Unified Data Platform, by Pauline Yeung of Cisco SystemsUnified Data Platform, by Pauline Yeung of Cisco Systems
Unified Data Platform, by Pauline Yeung of Cisco Systems
 
Build a High Available NFS Cluster Based on CephFS - Shangzhong Zhu
Build a High Available NFS Cluster Based on CephFS - Shangzhong ZhuBuild a High Available NFS Cluster Based on CephFS - Shangzhong Zhu
Build a High Available NFS Cluster Based on CephFS - Shangzhong Zhu
 
Where is my bottleneck? Performance troubleshooting in Flink
Where is my bottleneck? Performance troubleshooting in FlinkWhere is my bottleneck? Performance troubleshooting in Flink
Where is my bottleneck? Performance troubleshooting in Flink
 
Elk devops
Elk devopsElk devops
Elk devops
 
“Alexa, be quiet!”: End-to-end near-real time model building and evaluation i...
“Alexa, be quiet!”: End-to-end near-real time model building and evaluation i...“Alexa, be quiet!”: End-to-end near-real time model building and evaluation i...
“Alexa, be quiet!”: End-to-end near-real time model building and evaluation i...
 
Call me maybe: Jepsen and flaky networks
Call me maybe: Jepsen and flaky networksCall me maybe: Jepsen and flaky networks
Call me maybe: Jepsen and flaky networks
 
Streaming with Oracle Data Integration
Streaming with Oracle Data IntegrationStreaming with Oracle Data Integration
Streaming with Oracle Data Integration
 

Similaire à Kopdar Zimbra-ID , How to use Zimbra SOAP API

SCWCD 1. get post - url (cap1 - cap2 )
SCWCD 1. get   post - url (cap1 - cap2 )SCWCD 1. get   post - url (cap1 - cap2 )
SCWCD 1. get post - url (cap1 - cap2 )
Francesco Ierna
 
Voice enable smtp client
Voice enable smtp clientVoice enable smtp client
Voice enable smtp client
Nilesh Padwal
 
Productivity Acceleration Tools for SOA Testers
Productivity Acceleration Tools for SOA TestersProductivity Acceleration Tools for SOA Testers
Productivity Acceleration Tools for SOA Testers
WSO2
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web services
Neil Ghosh
 
E-Mail - Technical Overview
E-Mail - Technical OverviewE-Mail - Technical Overview
E-Mail - Technical Overview
Venkatesh Iyer
 
Simple Object Access Protocol
Simple Object Access ProtocolSimple Object Access Protocol
Simple Object Access Protocol
Saatviga Sudhahar
 
Introductionto Xm Lmessaging
Introductionto Xm LmessagingIntroductionto Xm Lmessaging
Introductionto Xm Lmessaging
LiquidHub
 

Similaire à Kopdar Zimbra-ID , How to use Zimbra SOAP API (20)

SCWCD 1. get post - url (cap1 - cap2 )
SCWCD 1. get   post - url (cap1 - cap2 )SCWCD 1. get   post - url (cap1 - cap2 )
SCWCD 1. get post - url (cap1 - cap2 )
 
Testing Soap/Rest Web Services with JMeter
Testing Soap/Rest Web Services with JMeterTesting Soap/Rest Web Services with JMeter
Testing Soap/Rest Web Services with JMeter
 
Voice enable smtp client
Voice enable smtp clientVoice enable smtp client
Voice enable smtp client
 
Productivity Acceleration Tools for SOA Testers
Productivity Acceleration Tools for SOA TestersProductivity Acceleration Tools for SOA Testers
Productivity Acceleration Tools for SOA Testers
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web services
 
Asp.Net difference faqs- 4
Asp.Net difference faqs- 4Asp.Net difference faqs- 4
Asp.Net difference faqs- 4
 
WEB TECHNOLOGIES JSP
WEB TECHNOLOGIES  JSPWEB TECHNOLOGIES  JSP
WEB TECHNOLOGIES JSP
 
Automation of Deep learning training with AWS Step Functions
Automation of Deep learning training with AWS Step FunctionsAutomation of Deep learning training with AWS Step Functions
Automation of Deep learning training with AWS Step Functions
 
Reaching Out From PL/SQL (OPP 2010)
Reaching Out From PL/SQL (OPP 2010)Reaching Out From PL/SQL (OPP 2010)
Reaching Out From PL/SQL (OPP 2010)
 
Introduction To Web (Mukesh Patel)
Introduction To Web (Mukesh Patel)Introduction To Web (Mukesh Patel)
Introduction To Web (Mukesh Patel)
 
E-Mail - Technical Overview
E-Mail - Technical OverviewE-Mail - Technical Overview
E-Mail - Technical Overview
 
Ruby
RubyRuby
Ruby
 
Lecture19
Lecture19Lecture19
Lecture19
 
Python RESTful webservices with Python: Flask and Django solutions
Python RESTful webservices with Python: Flask and Django solutionsPython RESTful webservices with Python: Flask and Django solutions
Python RESTful webservices with Python: Flask and Django solutions
 
Simple Object Access Protocol
Simple Object Access ProtocolSimple Object Access Protocol
Simple Object Access Protocol
 
Mca5010 web technologies
Mca5010   web technologiesMca5010   web technologies
Mca5010 web technologies
 
Chat app case study - xmpp vs SIP
Chat app case study - xmpp vs SIPChat app case study - xmpp vs SIP
Chat app case study - xmpp vs SIP
 
Web Services Tutorial
Web Services TutorialWeb Services Tutorial
Web Services Tutorial
 
Introductionto Xm Lmessaging
Introductionto Xm LmessagingIntroductionto Xm Lmessaging
Introductionto Xm Lmessaging
 
Spring batch
Spring batchSpring batch
Spring batch
 

Dernier

Dernier (20)

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
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...
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 

Kopdar Zimbra-ID , How to use Zimbra SOAP API

  • 1. How to Use Zimbra SOAP API by: Imam Omar mochtar kopdarZimbraID#1 31-08-2019 @kedaiJadoel
  • 2. > whoami ● Father of one beloved daughter and wife (for now). ● Working as IT consultant with “PALUGADA” oriented. ● Love to Code, commonly Python chosen as my swiss army knife. ● Hold several IT certificates one of them is Zimbra Admin.
  • 3. What Is SOAP anyway ? and how it related to Zimbra ?
  • 4. SOAP (Simple Object Access Protocol) ● (Old) A Web Service. ● Through HTTP and POST method to exchange the data. ● Commonly using XML for message format. *In a glance
  • 6.
  • 10. 2. See How to Compose and Receive the Payload
  • 11. 3. Get SOAP End Point ● Admin namespace https://[SERVER]/:7071/service/admin/soap ● Non admin namespace https://[SERVER]/service/soap Under the hood
  • 12. 4. Choose the Arsenal (HTTP Client)
  • 14. 1. Get the token Request Response Login Token Lifetime in milliseconds, 12 hours as default Namespace Note: ● You can extend token lifetime by modify zimbraAdminAuthTokenLifetime ● zmprov using zimbra_user and zimbra_ldap_password for login ● We will use token for next request, if it was expired then refetch again.
  • 15. Hint: you can use JSON though
  • 16. Hint: you can use JSON though (cont’d) Note: ● Set Content-Type header to application/json. ● The returned content also as JSON.
  • 17. 2. Add Payload and Set Token in Header Token
  • 18. Hint: zmsoap can be useful Note: ● Use argument -vv to print out the SOAP request and response. ● You can also change the format to JSON instead XML by argument --json. ● -z is for authenticated as admin, you can specify user & password too by -a for user and -p for password. ● Use -t to specify the scoop / namespace, the default is admin. ● Set “as user” by using argument -m.
  • 19.
  • 20. Demo
  • 21. 1. Scripting, Usecase: Bulk Set User Attributes and Renaming Account. The sequences are: 1. Loop through csv file, first column is existing email, the second one is new email. 2. Make sure the account is exist. 3. Rename account for prevent duplicated account while in process. 4. Add existing email as alias. 5. Set existing email in canonical address (outgoing email masking). 6. Rename account to actual new email.
  • 22. Hint: Java is Fast But it Slow to Start. It’s Fast brah ….
  • 23. 2. Identity and Access Management (IAM) Integration.