SlideShare a Scribd company logo
Michael Geiser
PhillyJUG
June 24, 2015
 Overview ofWSO2 Company and Platform
 Summary ofWSO2 Identity Server
 Demo of Identity Server Main Features
 Demo of Single Sign On with SAML2 and OAuth
 Development of Feature Extending OS Product
 Process and Status of Contribution
 I added the Code Commenting discussion notes
to the end of the deck.
Site: http://wso2.com
Company Overview: http://www.slideshare.net/wso2.org/wso2-platform-
introduction?related=2
The suite ofWSO2 products are 100% Open Source and based on Open Standards.
WSO2 monetizes the product by selling support much like RedHat (but without
the subscription-only Enterprise Edition).
Developers can extend the platform and customize code (we’ll see an example of
this later).
WSO2 says their key advantage is allWSO2 products are built on a common
foundation – “WSO2 Carbon”; a modular, reconfigurable, elastic, OSGi-based
architecture.This creates a strong stable base for building as well as integrating
with existing large-scale enterprise applications.
Open Services Gateway initiative
Site: http://wso2.com
Product Site: http://wso2.com/products/identity-server/
WSO2 Identity Server enables enterprise architects and developers to
• Deliver an inter-Enterprise Single Sign-On/Signout environment.
• Simplify identity provisioning
• Guarantee secure online interactions
The WSO2 Identity Server decreases identity management and entitlement
management administration burden by:
• Including role based access control (RBAC) convention
• Fine-grained policy based access control - XACML
• SSO bridging to internal and external destination
WSO2 Identity Server is an entitlement management server for security and
identity management of :
• EnterpriseWeb applications
• Services
• APIs
Product Site: http://wso2.com/products/identity-server/
WSO2 Identity Server enables enterprise architects and developers to
• Improve customer experience by reducing identity provisioning time
• Guarantee secure online interactions
• Deliver a inter-Enterprise Single Sign-On/Signout environment.
The WSO2 Identity Server decreases identity management and entitlement
management administration burden by:
• Including role based access control (RBAC) convention
• Fine-grained policy based access control
• SSO bridging to internal and external destination
WSO2 Identity Server is an entitlement management server for security and
identity management of :
• EnterpriseWeb applications
• Services
• APIs
An open source Identity
& Entitlement
management server
 User Stores and configurations in LDAP/AD/JDBC/others
 Multiple integrated user stores
 Multi-tenant
 Multiple Identity Standards
 OpenID
 SAML2
 OAuth 1.0a/2.0
 SecurityToken Service withWS-Trust
 Kerberos
 IntegratedWindows AD Authentication
 WS-Fed Passive
 XACML 2.0/3.0
 SCIM 1.1
 WS-XACML
An open source Identity & Entitlement
management server
An open source Identity & Entitlement
management server
Authentication
ADLDAP JDBC
An open source Identity & Entitlement
management server
Authentication
ADLDAP JDBC
X
An open source Identity & Entitlement
management server
Authentication
Single Sign On
SAML2 Kerberos WS-Fed Passive
SharePoint
Company
Developed
Web Apps
 Single Sign On / Single Logout
 Widely used by *aaS providers
[Google Apps, Salesforce]
 SAML2Web SSO Profile
 SAML2 Attribute Profile
 Distributed Federated SAML2 IdPs
 Identity Delegation
 Securing RESTful services
 2-legged & 3-legged OAuth 1.01
 XACML integration with OAuth
 OAuth 2.0 support with
Authorization Code, Implicit,
Resource Owner Credentials,
Client Credentials
 Decentralized Single Sign On
 Single user profile
 Widely used for community & collaboration
aspects
 MultifactorAuthentication
 OpenID relying party components
An open source Identity & Entitlement
management server
Authentication
Single Sign On
Provisioning
SCIMSPML
WSO2
APIs
Service Provisioning Markup Language
SCIM Service
Provider
/Users
/GroupsSCIM Consumer
{
"schemas":[],
"name":{"familyName":”Geiser","givenName":”Michael"},
"userName":”mgeiser","password":”correcthorsebatterystaple",
"emails":[{"primary":true,"value":”phillyjug@gmail.com","type":“jugmaster"},
{"value":”mgeiser@mgeiser.net","type":“personal"}]
}
curl -v -k --user admin:admin -d @add-user.json --header "Content-Type:application/json"
https://localhost:9443/wso2/scim/Users
add-user.json
curl command
{
"schemas": ["urn:scim:schemas:core:1.0"],
"id": “PhillyJUG_Members",
"displayName": “PhillyJUG Members",
}
curl -v -k --user admin:admin -d @add-group.json --header "Content-Type:application/json"
https://localhost:9443/wso2/scim/Groups
add-group.json
curl command
WSO2
SCIM Consumer (facilelogin.com)
SCIM Consumer (wso2.com)
wso2.com
facilelogin.com
Multitenancy maximizes resource sharing by allowing multiple
distinct and separate entities (tenants) use a single server/cluster
where each tenant is given the experience of using his/her own
server, rather than a shared environment. Multitenancy ensures
optimal performance of the system's resources such as memory
and hardware and also secures each tenant's personal data.
As you should expect, different tenant are logically isolated as if
there were on separate virtual machines/instances. There is even
the ability to physically isolate the user datastores but use the same
server infrastructures
An open source Identity & Entitlement
management server
Role Based Access Control (sorta)
An open source Identity & Entitlement
management server
Role Based Access Control
Policy Based Access Control (sorta)
XACML
An open source Identity & Entitlement
management server
Role Based Access Control
Policy Based Access Control
SOAP
XACML / WS-XACML
An open source Identity & Entitlement
management server
Role Based Access Control
Policy Based Access Control
SOAP
REST
XACML
 eXtensible Access Control Markup Language
 Implements XACML 3.0
 Support for multiple PIPs
 Policy distribution
 Decision / Attribute caching
 UI wizard for defining policies
 Notifications on policy updates
 TryIt tool to testWIP
 ManagementConsole
 Single Sign On between MultipleApps
Authenticate & obtain Authorization Code
Laptop BasedVMs
 Need a good great laptop: quad core i7, 32Gb RAM, 500GB SSD =
~$1500 (I have aThinkPad w540)
 Maybe can get away with ~$425 for 32Gb RAM and a big (750Gb)
SSD if your current laptop can take the RAM (16Gb OK)
 Requires you to do provisioning and set up networking
 Must decide betweenVirtualBox &VMware (LinuxVMM is like
LDAP, Open Office or Isla Nublar; best avoided when possible)
 If everyone doesn’t standardize , you can ‘t easily shareVMs
 Availability and access for others limited to when your laptop is
online
 Networking and Port security can cause problems even with NAT
 Linux networking with multipleVMs on a laptop that changes
network connections is problematic.
 Almost need to have Linux host OS
 Docker andVagrant are your friend
AWS
 Can use “normal” laptop
 Everyone can access anywhere anytime
 Per hour costs are quite reasonable; especially if you shut down
when not working;
 Is $25-$50/month recurring OpEx for AWS better than $2000
CapEx? For a new laptop (but you should lease your laptop
regardless so you can refresh your tech more often...)
 AWS provisioning and networking abstracts many PITA details for
you
 Having REAL AWS experience is a HUGE plus on your resume...
Want to learn Linux? This is a great start (plus you should be
taking courses on EdX anyway)
https://www.edx.org/course/introduction-linux-linuxfoundationx-
lfs101x-2
 Feature Gap
 Set up Dev environment
 Mapped requirements to features and
planned implementation
 TheWSO2 JDBC UserStore doesn’t have a
Password Reuse Policy (I know...REALLY??!!)
 This is a must-have feature for almost anyone
 WSO2 is Java & Open Source; we do Java.
 How hard could it be?
 What could go wrong?
 We already scheduledWSO2 onsite for “Quick
StartWeek ” engagement and just added this
to the agenda and breakout sessions
The high level requirements for Password Reuse Policy.
• Settings properties file will allow configuration of:
• Time-based Password Reuse (# of days before reuse)
• Frequency-based Password Reuse (# of interim passwords before reuse)
• Admins will be allowed to chose eitherTime-based and/or Frequency-based Password
Reuse on/off and settings
• These will be additive; if the admin sets the timeThreshold=90 and
frequencyTheshold=10 then a password cannot be reused for 90 days regardless of how
many times it changes and a password cannot be reused for 10 password changes (even
if the user only changes the password once every 90 days).
• Data must be persisted securely to support this policy
• Data maintenance will be implement to remove unneeded records and must happen
during the password change event
• More...
(this was a short, low resolution summary of the User Stories describing the feature)
 WSO2 uses Apache Felix andOSGi framework for a dynamic
component based application
 The OSGi specification defines modular systems and a service
platforms for Java that implement a complete and dynamic
component model.
 Applications or components, packaged the form of bundles for
deployment (i.e. jars) , can be remotely installed, started, stopped,
updated, and uninstalled without requiring a JVM restart.
 The OSGi specifications have evolved beyond the original focus of
service gateways, and are now used in applications ranging from
mobile phones to the Eclipse IDE.
Pretty much what expect
from package names
Important stuff
 The component class contains the
annotations needed to specify the
component and when it is activated
@scr.component name="org.wso2.custom.identity.mgt.internal.CustomIdentityMgtServiceComponent"
immediate="true"
 The class implements activate() and
deactivate() methods; think JUnit’s setUp()
and tearDown() methods
 Our WSO2 component model extends the existing IdentityMgtEventListener
class and override functionality where the behavior has to change.
 The original IdentityMgtEventListener essentially updates the Password for a
user if the Password Composition Policy and other existing tests pass.
Example: a user has to provide the correct currentPassword and a newPassword and
the newPassword must comply with all Password Composition Policy tests before a
user's password is changed.
Our added functionality will:
 instantiate our new PasswordHistoryPolicyManager class where needed in the
CustomIdentityMgtEventListener
 Call methods on the PasswordHistoryPolicyManager class as needed for new
functionality
 Run updated or reimplemented code and call super as needed
Actual Implementation of the New Policy
 Calls DAO to get Password History of a user
 Determines if new Password complies with
the Frequency and ElapsedTime thresholds
limiting reuse
 Calls DAO to insert new Password History
data for a user
 Calls DAO to perform Password History
database table data maintenance
 Toad to database
 Records change
WSO2 implements OSGi and Felix...
Deployment Procedure
Add the new table to the UserStore schema
 Run DDL in target database schema
Compile jar
 mvn clean install
Copy jar from maven repository toWSO2 "dropin" directory
 from
C:Usersmgeiser.m2repositoryorgwso2sampleorg.wso2.custom.identity.
mgt1.0.0-SNAPSHOTorg.wso2.custom.identity.mgt-1.0.0-SNAPSHOT.jar
 to
<IS_HOME>/repository/components/dropins
Copy configuration file from GIT to <IS_HOME>/repository/conf/security
Restart the WSO2 Identity Server service
Code reviews, unit tests and functional testing have indicated a few
improvements that are needed before this new component is fully “Production
Ready"
 DDL Refactoring / Improvements
 DRI - IDN_IDENTITY_PASSWORD_HISTORY.USER_NAME and
IDN_IDENTITY_PASSWORD_HISTORY.TENANT_ID are FKs but no DRI is defined
 Covering Indexes - SQL Execution Plans (and inspection) indicates additional indexes are
needed
 Data Maintenance on User Delete Event
 When a Password is changed, the Password History entries for a user is trimmed to only keep
the number of passwords the are required to the Frequency andTime thresholds.
 An additional component will be needed that will extend the User Management Service
Component and delete all IDN_IDENTITY_PASSWORD_HISTORY entries for a user when the
user is deleted.
 Currently the records will be orphaned in the table. Eventually the orphaned records will
affect the efficiency of the system and wastes storage. This needs to be fixed ASAP
 Doing this data maintenance based on the delete user event is best; running a periodic job
that finds orphaned records is "computationally expensive" and gets more resource intensive
as the number of users in the system grows.
 Requirement Definition and Dropin component submitted (pending final
revisions) toWSO2 via our Account Manager
 WSO2 architects and reviewers will review code and artifacts and
respond with questions
 WSO2 will add to roadmap based on capacity to update and test
 Since requirements definition and working code exists as Dropin, this will help
to minimize this effort and timeline
 New DB table and DB traffic will slow down adoption slightly for testing
 High complexity compared to other submitted features
 Code will be available as a dropin to other users until official adoption
 WSO2 will often include developers blogs and other contributions in the
WSO2 documents site if it contributes to the community.
 I'll be writing up a page for this Dropin and attempt to get it on-line on
late July or early August
 Thanks for coming out!
Architecturally, an LDAP/DirectoryServer solution has drawbacks compared to a relational database solution:
 LDAP is designed for a high read-to-write ratio (10:1 or 100:1 is most often quoted as optimal for LDAP based directories).
For any Password Policy that tracks attempted authentications, the Directory Server must update data once for every read
that checks passwords (i.e. any authentication attempt). Idle and maximum (a.k.a soft and hard) timeouts are another
required feature. Even though the Policy Server caches information whenever possible, implementing timeouts require
updates to the User DataStore so that the timeout information can be shared among all Policy Servers.
 LDAP is an Access Protocol (LDAP = Lightweight DirectoryAccess Protocol) not a data store. LDAP data stores use some
storage app, usually a RDBMS like H2, MySQL, Oracle or SQL Server) in a black-box configuration. The implementer must
support this application and the additional backup, restore, sizing, HA and other Operational needs through the tools
provided which is additional to their existing oprerations procedures and skills
 Customization of the datastore for LDAP based datastores is complex and leads to applications reusing existing attributes
to store data instead of correctly named attributes (like stateOrProvence) being reused for another attribute instead of a
precisely named attribute name.
 LDAP adds an additional layer of abstraction and latency to your application but really doesn’t add any advantage for his
extra complexity. Applications such asWSO2 can access a JDBC baseddatastore or an LDAP datastore.
 LDAP Connection Pooling support is non-existent or is very limited; this can be a scalability and performance concern.
 LDAP is not a transactional protocol. Generally, Identity Management is closely coupled to other database transactions
and the ability to have changes to the Identity Management user store and other schema participate in transactions is
important. Not having transactions means rollbacks of an update requires a compensating transaction to “undo” the
update.
 LDAP and Directory Servers do not have DRI, locking, or check constraints even if the relational database the LDAP
implementation is built on supports them.
Architecturally, an LDAP/DirectoryServer solution has drawbacks compared to a relational database solution:
 Directory Server data has limited DataTyping . There areStrings, Numbers (Integer), Time, Telephone Numbers,
Boolean, Binary, Distinguished Name and Bit Strings data types in directory servers. Decimal (and all non-integer
numeric) data and complex types (objects) must be stored as a string or serialized/deserialized and explicitly cast if used in
any application (SQL, JavaVisual basic…). And there are limits on searchability and indexability (and indexing in general);
especially for non-native data types . Relational database (like Oracle) datatypes map to Java SQL datatypes without any
casts.
 LDAP has no equivalent structure to stored procedures (and packages). It is desirable to have the SQL for data input and
output abstracted from the calling applications to minimize the risk and impact to existing applications of future changes
to the User DataStore. Decoupling the release cycles of the database and Business logic as much as possible is a more
agile approach
 A Directory Server has minimal Error Handling internally and externally error handlers must be coded and implanted in all
ode that calls into the Directory Server. Relational databases’ Error Handling allows for better and more consistent
exception handling, resolution, and logging and encapsulates these functions from the calling application.
 Remember, you are writing code for other people, including
(especially) your future self. They/you will have to debug or
modify the code.
 Commenting is necessary because you need to tell people
what you intended to do and why you chose to do it a
specific way.
 While what the code does should be "self-evident" (an oxymoron
usually) from inspection of the code, you need to communicate
what you INTENDED to do; it is possible you made a logic error.
 Comments also do NOT slow you down (as some people
say) ; I’ve timed it. I spend at most 10 to 20 minutes
commenting an entire class. It is impossible to argue that is
not time well spent.
 Comments are NOT counted as LOCs and absolutely do
NOT add to maintainability costs; they do just the opposite.
 Also, just as there are many ways to skin a cat
(that is really an awful expression, isn't it?), there
are many ways to implement the logic on how to
fulfill a requirement.
 I’m sure you always have an insightful and well-
reasoned thought process behind why you implement
a bit of logic in a certain way. You need to document in
comments why you chose a specific implementation.
 Commenting will answer questions without future
maintainers guessing (and second-guessing)) your
reasons and allow them to determine if the
implementation is still the best implementation as the
application evolves and business requirements are
refined or changed over time
 Not all classes need the same level of
commenting
 DTOs do not require much commenting, just a
sentence or two that relates it to the other code
 Implementations (like the 3 Password History
classes in the previous example) often have more
bytes of comments than code
 Level of commenting in other classes vary
Comment Content should be
 What you intended to implement (the code
shows what you did implement)
 Explanations of how tricky and clever bits of
logic work (for people not as smart as you)
 What User Stories have the requirements
you’re implementing
 Design Decisions (for example: why you
chose HashMap overTreeMap or
LinkedHashMap)
Err on the side of too much commenting
I have a simple one class that illustrates the point.
This is a quick “down and dirty” app that is meant to run from Eclipse.
Evaluate the MontyHallProblem_NoComments.java version of the class first and
then evaluate the MontyHallProblem.java code.
GitHub Website: https://github.com/mgeiser/MontyHallProblem
Git Repo: https://github.com/mgeiser/MontyHallProblem.git

More Related Content

PDF
InfoTRAMS - Czy platforma Microsoft Azure jest biznoseow bezpieczna?
PPTX
SSO IN/With Drupal and Identitiy Management
DOC
Abhilash_Documentum
ODP
Authentication and Single Sing on
PDF
Microservices: Architecture to Support Agile
PDF
Identity Management Overview: CAS and Shibboleth
DOCX
Middleware Architect/Lead/Sr. System Admin
PPTX
IdP, SAML, OAuth
InfoTRAMS - Czy platforma Microsoft Azure jest biznoseow bezpieczna?
SSO IN/With Drupal and Identitiy Management
Abhilash_Documentum
Authentication and Single Sing on
Microservices: Architecture to Support Agile
Identity Management Overview: CAS and Shibboleth
Middleware Architect/Lead/Sr. System Admin
IdP, SAML, OAuth

What's hot (20)

PDF
Alfresco: Implementing secure single sign on (SSO) with OpenSAML
 
PDF
Microservices and Self-contained System to Scale Agile
PDF
Case Study: Plus Retail - Moving from the Old World to the New World
DOCX
V mware course contents copy
PDF
“Secure Portal” or WebSphere Portal – Security with Everything
PPTX
DataPower Restful API Security
PDF
WSO2 Year End Tech Update 2012
PDF
Microsoft SQL Licensing Workshop - Software ONE
PDF
MS TechDays 2011 - Cloud Computing with the Windows Azure Platform
PPTX
Identity Management for Web Application Developers
PDF
Microsoft PaaS Cloud Windows Azure Platform
PDF
How Small Can Java Microservices Be?
PPTX
vCloud Architecture BrownBag
PDF
Intorduction to Datapower
PDF
Otm 2013 c13_e-13b-hagan-mark-otm-soa
PPTX
2014 q3-platform-update-v1.06.johnmathon
PDF
Layer 7 and Oracle -
PPTX
AD FS Workshop | Part 1 | Quick Overview
PDF
Vmware vsphere Training
PPTX
Alfresco: Implementing secure single sign on (SSO) with OpenSAML
 
Microservices and Self-contained System to Scale Agile
Case Study: Plus Retail - Moving from the Old World to the New World
V mware course contents copy
“Secure Portal” or WebSphere Portal – Security with Everything
DataPower Restful API Security
WSO2 Year End Tech Update 2012
Microsoft SQL Licensing Workshop - Software ONE
MS TechDays 2011 - Cloud Computing with the Windows Azure Platform
Identity Management for Web Application Developers
Microsoft PaaS Cloud Windows Azure Platform
How Small Can Java Microservices Be?
vCloud Architecture BrownBag
Intorduction to Datapower
Otm 2013 c13_e-13b-hagan-mark-otm-soa
2014 q3-platform-update-v1.06.johnmathon
Layer 7 and Oracle -
AD FS Workshop | Part 1 | Quick Overview
Vmware vsphere Training
Ad

Similar to Introduction to the WSO2 Identity Server &Contributing to an OS Project (20)

PDF
WSO2 Identity Server - Product Overview
PPTX
WSO2Con USA 2014 - Identity Server Tutorial
PDF
Borderless Federated-Identity
PPTX
Synergies across APIs and IAM
PDF
WSO2 ITALIA SMART TALK #3 WSO2 IS NEW FEATURE
PDF
#3 Wso2 masterclassitalia - wso2 Identity Server: must-have per gestire le id...
PDF
WSO2Con ASIA 2016: Case Study: Identity in the WSO2 Ecosystem
PDF
Benefits of Using Open Source IAM
PDF
Enterprise Security Requirements
PDF
Single sign on using WSO2 identity server
PDF
WSO2 Identity Server
PDF
Identity and Entitlement Management Concepts
PDF
SSO with the WSO2 Identity Server
PDF
Sso with the wso2 identity server
PDF
WSO2.Telco - The Open Source Digital Enablement Platform
PDF
Identity Server on Azure: A Reference Architecture
PDF
Beyond Economics - Cloud as a Business Enabler
PDF
WSO2Con USA 2017: Introduction to Security: End-to-End Identity Management
PDF
WSO2s Unified Theory Of Middleware
PPTX
WSO2Con 2011: Introduction to the WSO2 Carbon Platform
WSO2 Identity Server - Product Overview
WSO2Con USA 2014 - Identity Server Tutorial
Borderless Federated-Identity
Synergies across APIs and IAM
WSO2 ITALIA SMART TALK #3 WSO2 IS NEW FEATURE
#3 Wso2 masterclassitalia - wso2 Identity Server: must-have per gestire le id...
WSO2Con ASIA 2016: Case Study: Identity in the WSO2 Ecosystem
Benefits of Using Open Source IAM
Enterprise Security Requirements
Single sign on using WSO2 identity server
WSO2 Identity Server
Identity and Entitlement Management Concepts
SSO with the WSO2 Identity Server
Sso with the wso2 identity server
WSO2.Telco - The Open Source Digital Enablement Platform
Identity Server on Azure: A Reference Architecture
Beyond Economics - Cloud as a Business Enabler
WSO2Con USA 2017: Introduction to Security: End-to-End Identity Management
WSO2s Unified Theory Of Middleware
WSO2Con 2011: Introduction to the WSO2 Carbon Platform
Ad

More from Michael J Geiser (19)

PPTX
CI / CD Roles, Processes and Supporting Tools
PPTX
AWS Cost Reduction and Management Plan
PPTX
2018 staffing strategy
DOCX
Response on Proposal for Converting to a Gated Community
DOCX
Skeptical Inquirer Content Problems
DOCX
Problems with Password Change Lockout Periods in Password Policies
PPTX
1967 lincoln continental convertible restoration v4
DOCX
Minimum Viable Product (MVP) – “Like This / Not Like This” Redux (MVP) – “Lik...
PPTX
Agile humor for slides
PPTX
Agile Progress Tracking and Code Complete Date Estimation
PPTX
Agile Release Planning
DOCX
Choosing an IdM User Store technology
PPTX
Maturing Agile SDLC & workflow improvements
DOCX
Really useful linux commands
PPTX
Jira workflow for documentation issue types agile edition
PPTX
Apigee dc failover
PPTX
Using JIRA to Manage Project Management Risks and Issues
PPTX
Approvals in jira
PDF
Girl Scout Cookie Sale Posters
CI / CD Roles, Processes and Supporting Tools
AWS Cost Reduction and Management Plan
2018 staffing strategy
Response on Proposal for Converting to a Gated Community
Skeptical Inquirer Content Problems
Problems with Password Change Lockout Periods in Password Policies
1967 lincoln continental convertible restoration v4
Minimum Viable Product (MVP) – “Like This / Not Like This” Redux (MVP) – “Lik...
Agile humor for slides
Agile Progress Tracking and Code Complete Date Estimation
Agile Release Planning
Choosing an IdM User Store technology
Maturing Agile SDLC & workflow improvements
Really useful linux commands
Jira workflow for documentation issue types agile edition
Apigee dc failover
Using JIRA to Manage Project Management Risks and Issues
Approvals in jira
Girl Scout Cookie Sale Posters

Recently uploaded (20)

PDF
Cloud-Scale Log Monitoring _ Datadog.pdf
PDF
RPKI Status Update, presented by Makito Lay at IDNOG 10
PDF
Triggering QUIC, presented by Geoff Huston at IETF 123
PPTX
international classification of diseases ICD-10 review PPT.pptx
PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
PPTX
innovation process that make everything different.pptx
PDF
The Internet -By the Numbers, Sri Lanka Edition
DOCX
Unit-3 cyber security network security of internet system
PDF
WebRTC in SignalWire - troubleshooting media negotiation
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
PPTX
Introduction to Information and Communication Technology
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
PPTX
INTERNET------BASICS-------UPDATED PPT PRESENTATION
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PPTX
presentation_pfe-universite-molay-seltan.pptx
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
PPTX
PptxGenJS_Demo_Chart_20250317130215833.pptx
PDF
Unit-1 introduction to cyber security discuss about how to secure a system
PPTX
QR Codes Qr codecodecodecodecocodedecodecode
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
Cloud-Scale Log Monitoring _ Datadog.pdf
RPKI Status Update, presented by Makito Lay at IDNOG 10
Triggering QUIC, presented by Geoff Huston at IETF 123
international classification of diseases ICD-10 review PPT.pptx
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
innovation process that make everything different.pptx
The Internet -By the Numbers, Sri Lanka Edition
Unit-3 cyber security network security of internet system
WebRTC in SignalWire - troubleshooting media negotiation
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
Introduction to Information and Communication Technology
Design_with_Watersergyerge45hrbgre4top (1).ppt
INTERNET------BASICS-------UPDATED PPT PRESENTATION
Tenda Login Guide: Access Your Router in 5 Easy Steps
presentation_pfe-universite-molay-seltan.pptx
An introduction to the IFRS (ISSB) Stndards.pdf
PptxGenJS_Demo_Chart_20250317130215833.pptx
Unit-1 introduction to cyber security discuss about how to secure a system
QR Codes Qr codecodecodecodecocodedecodecode
The New Creative Director: How AI Tools for Social Media Content Creation Are...

Introduction to the WSO2 Identity Server &Contributing to an OS Project

  • 2.  Overview ofWSO2 Company and Platform  Summary ofWSO2 Identity Server  Demo of Identity Server Main Features  Demo of Single Sign On with SAML2 and OAuth  Development of Feature Extending OS Product  Process and Status of Contribution  I added the Code Commenting discussion notes to the end of the deck.
  • 3. Site: http://wso2.com Company Overview: http://www.slideshare.net/wso2.org/wso2-platform- introduction?related=2 The suite ofWSO2 products are 100% Open Source and based on Open Standards. WSO2 monetizes the product by selling support much like RedHat (but without the subscription-only Enterprise Edition). Developers can extend the platform and customize code (we’ll see an example of this later). WSO2 says their key advantage is allWSO2 products are built on a common foundation – “WSO2 Carbon”; a modular, reconfigurable, elastic, OSGi-based architecture.This creates a strong stable base for building as well as integrating with existing large-scale enterprise applications. Open Services Gateway initiative
  • 5. Product Site: http://wso2.com/products/identity-server/ WSO2 Identity Server enables enterprise architects and developers to • Deliver an inter-Enterprise Single Sign-On/Signout environment. • Simplify identity provisioning • Guarantee secure online interactions The WSO2 Identity Server decreases identity management and entitlement management administration burden by: • Including role based access control (RBAC) convention • Fine-grained policy based access control - XACML • SSO bridging to internal and external destination WSO2 Identity Server is an entitlement management server for security and identity management of : • EnterpriseWeb applications • Services • APIs
  • 6. Product Site: http://wso2.com/products/identity-server/ WSO2 Identity Server enables enterprise architects and developers to • Improve customer experience by reducing identity provisioning time • Guarantee secure online interactions • Deliver a inter-Enterprise Single Sign-On/Signout environment. The WSO2 Identity Server decreases identity management and entitlement management administration burden by: • Including role based access control (RBAC) convention • Fine-grained policy based access control • SSO bridging to internal and external destination WSO2 Identity Server is an entitlement management server for security and identity management of : • EnterpriseWeb applications • Services • APIs An open source Identity & Entitlement management server
  • 7.  User Stores and configurations in LDAP/AD/JDBC/others  Multiple integrated user stores  Multi-tenant  Multiple Identity Standards  OpenID  SAML2  OAuth 1.0a/2.0  SecurityToken Service withWS-Trust  Kerberos  IntegratedWindows AD Authentication  WS-Fed Passive  XACML 2.0/3.0  SCIM 1.1  WS-XACML
  • 8. An open source Identity & Entitlement management server
  • 9. An open source Identity & Entitlement management server Authentication ADLDAP JDBC
  • 10. An open source Identity & Entitlement management server Authentication ADLDAP JDBC X
  • 11. An open source Identity & Entitlement management server Authentication Single Sign On SAML2 Kerberos WS-Fed Passive
  • 13.  Single Sign On / Single Logout  Widely used by *aaS providers [Google Apps, Salesforce]  SAML2Web SSO Profile  SAML2 Attribute Profile  Distributed Federated SAML2 IdPs
  • 14.  Identity Delegation  Securing RESTful services  2-legged & 3-legged OAuth 1.01  XACML integration with OAuth  OAuth 2.0 support with Authorization Code, Implicit, Resource Owner Credentials, Client Credentials
  • 15.  Decentralized Single Sign On  Single user profile  Widely used for community & collaboration aspects  MultifactorAuthentication  OpenID relying party components
  • 16. An open source Identity & Entitlement management server Authentication Single Sign On Provisioning SCIMSPML WSO2 APIs Service Provisioning Markup Language
  • 18. { "schemas":[], "name":{"familyName":”Geiser","givenName":”Michael"}, "userName":”mgeiser","password":”correcthorsebatterystaple", "emails":[{"primary":true,"value":”phillyjug@gmail.com","type":“jugmaster"}, {"value":”mgeiser@mgeiser.net","type":“personal"}] } curl -v -k --user admin:admin -d @add-user.json --header "Content-Type:application/json" https://localhost:9443/wso2/scim/Users add-user.json curl command { "schemas": ["urn:scim:schemas:core:1.0"], "id": “PhillyJUG_Members", "displayName": “PhillyJUG Members", } curl -v -k --user admin:admin -d @add-group.json --header "Content-Type:application/json" https://localhost:9443/wso2/scim/Groups add-group.json curl command
  • 19. WSO2 SCIM Consumer (facilelogin.com) SCIM Consumer (wso2.com) wso2.com facilelogin.com Multitenancy maximizes resource sharing by allowing multiple distinct and separate entities (tenants) use a single server/cluster where each tenant is given the experience of using his/her own server, rather than a shared environment. Multitenancy ensures optimal performance of the system's resources such as memory and hardware and also secures each tenant's personal data. As you should expect, different tenant are logically isolated as if there were on separate virtual machines/instances. There is even the ability to physically isolate the user datastores but use the same server infrastructures
  • 20. An open source Identity & Entitlement management server Role Based Access Control (sorta)
  • 21. An open source Identity & Entitlement management server Role Based Access Control Policy Based Access Control (sorta) XACML
  • 22. An open source Identity & Entitlement management server Role Based Access Control Policy Based Access Control SOAP XACML / WS-XACML
  • 23. An open source Identity & Entitlement management server Role Based Access Control Policy Based Access Control SOAP REST XACML
  • 24.  eXtensible Access Control Markup Language  Implements XACML 3.0  Support for multiple PIPs  Policy distribution  Decision / Attribute caching  UI wizard for defining policies  Notifications on policy updates  TryIt tool to testWIP
  • 25.  ManagementConsole  Single Sign On between MultipleApps
  • 26. Authenticate & obtain Authorization Code
  • 27. Laptop BasedVMs  Need a good great laptop: quad core i7, 32Gb RAM, 500GB SSD = ~$1500 (I have aThinkPad w540)  Maybe can get away with ~$425 for 32Gb RAM and a big (750Gb) SSD if your current laptop can take the RAM (16Gb OK)  Requires you to do provisioning and set up networking  Must decide betweenVirtualBox &VMware (LinuxVMM is like LDAP, Open Office or Isla Nublar; best avoided when possible)  If everyone doesn’t standardize , you can ‘t easily shareVMs  Availability and access for others limited to when your laptop is online  Networking and Port security can cause problems even with NAT  Linux networking with multipleVMs on a laptop that changes network connections is problematic.  Almost need to have Linux host OS  Docker andVagrant are your friend
  • 28. AWS  Can use “normal” laptop  Everyone can access anywhere anytime  Per hour costs are quite reasonable; especially if you shut down when not working;  Is $25-$50/month recurring OpEx for AWS better than $2000 CapEx? For a new laptop (but you should lease your laptop regardless so you can refresh your tech more often...)  AWS provisioning and networking abstracts many PITA details for you  Having REAL AWS experience is a HUGE plus on your resume... Want to learn Linux? This is a great start (plus you should be taking courses on EdX anyway) https://www.edx.org/course/introduction-linux-linuxfoundationx- lfs101x-2
  • 29.  Feature Gap  Set up Dev environment  Mapped requirements to features and planned implementation
  • 30.  TheWSO2 JDBC UserStore doesn’t have a Password Reuse Policy (I know...REALLY??!!)  This is a must-have feature for almost anyone  WSO2 is Java & Open Source; we do Java.  How hard could it be?  What could go wrong?  We already scheduledWSO2 onsite for “Quick StartWeek ” engagement and just added this to the agenda and breakout sessions
  • 31. The high level requirements for Password Reuse Policy. • Settings properties file will allow configuration of: • Time-based Password Reuse (# of days before reuse) • Frequency-based Password Reuse (# of interim passwords before reuse) • Admins will be allowed to chose eitherTime-based and/or Frequency-based Password Reuse on/off and settings • These will be additive; if the admin sets the timeThreshold=90 and frequencyTheshold=10 then a password cannot be reused for 90 days regardless of how many times it changes and a password cannot be reused for 10 password changes (even if the user only changes the password once every 90 days). • Data must be persisted securely to support this policy • Data maintenance will be implement to remove unneeded records and must happen during the password change event • More... (this was a short, low resolution summary of the User Stories describing the feature)
  • 32.  WSO2 uses Apache Felix andOSGi framework for a dynamic component based application  The OSGi specification defines modular systems and a service platforms for Java that implement a complete and dynamic component model.  Applications or components, packaged the form of bundles for deployment (i.e. jars) , can be remotely installed, started, stopped, updated, and uninstalled without requiring a JVM restart.  The OSGi specifications have evolved beyond the original focus of service gateways, and are now used in applications ranging from mobile phones to the Eclipse IDE.
  • 33. Pretty much what expect from package names Important stuff
  • 34.  The component class contains the annotations needed to specify the component and when it is activated @scr.component name="org.wso2.custom.identity.mgt.internal.CustomIdentityMgtServiceComponent" immediate="true"  The class implements activate() and deactivate() methods; think JUnit’s setUp() and tearDown() methods
  • 35.  Our WSO2 component model extends the existing IdentityMgtEventListener class and override functionality where the behavior has to change.  The original IdentityMgtEventListener essentially updates the Password for a user if the Password Composition Policy and other existing tests pass. Example: a user has to provide the correct currentPassword and a newPassword and the newPassword must comply with all Password Composition Policy tests before a user's password is changed. Our added functionality will:  instantiate our new PasswordHistoryPolicyManager class where needed in the CustomIdentityMgtEventListener  Call methods on the PasswordHistoryPolicyManager class as needed for new functionality  Run updated or reimplemented code and call super as needed
  • 36. Actual Implementation of the New Policy  Calls DAO to get Password History of a user  Determines if new Password complies with the Frequency and ElapsedTime thresholds limiting reuse  Calls DAO to insert new Password History data for a user  Calls DAO to perform Password History database table data maintenance
  • 37.  Toad to database  Records change
  • 38. WSO2 implements OSGi and Felix... Deployment Procedure Add the new table to the UserStore schema  Run DDL in target database schema Compile jar  mvn clean install Copy jar from maven repository toWSO2 "dropin" directory  from C:Usersmgeiser.m2repositoryorgwso2sampleorg.wso2.custom.identity. mgt1.0.0-SNAPSHOTorg.wso2.custom.identity.mgt-1.0.0-SNAPSHOT.jar  to <IS_HOME>/repository/components/dropins Copy configuration file from GIT to <IS_HOME>/repository/conf/security Restart the WSO2 Identity Server service
  • 39. Code reviews, unit tests and functional testing have indicated a few improvements that are needed before this new component is fully “Production Ready"  DDL Refactoring / Improvements  DRI - IDN_IDENTITY_PASSWORD_HISTORY.USER_NAME and IDN_IDENTITY_PASSWORD_HISTORY.TENANT_ID are FKs but no DRI is defined  Covering Indexes - SQL Execution Plans (and inspection) indicates additional indexes are needed  Data Maintenance on User Delete Event  When a Password is changed, the Password History entries for a user is trimmed to only keep the number of passwords the are required to the Frequency andTime thresholds.  An additional component will be needed that will extend the User Management Service Component and delete all IDN_IDENTITY_PASSWORD_HISTORY entries for a user when the user is deleted.  Currently the records will be orphaned in the table. Eventually the orphaned records will affect the efficiency of the system and wastes storage. This needs to be fixed ASAP  Doing this data maintenance based on the delete user event is best; running a periodic job that finds orphaned records is "computationally expensive" and gets more resource intensive as the number of users in the system grows.
  • 40.  Requirement Definition and Dropin component submitted (pending final revisions) toWSO2 via our Account Manager  WSO2 architects and reviewers will review code and artifacts and respond with questions  WSO2 will add to roadmap based on capacity to update and test  Since requirements definition and working code exists as Dropin, this will help to minimize this effort and timeline  New DB table and DB traffic will slow down adoption slightly for testing  High complexity compared to other submitted features  Code will be available as a dropin to other users until official adoption  WSO2 will often include developers blogs and other contributions in the WSO2 documents site if it contributes to the community.  I'll be writing up a page for this Dropin and attempt to get it on-line on late July or early August
  • 41.  Thanks for coming out!
  • 42. Architecturally, an LDAP/DirectoryServer solution has drawbacks compared to a relational database solution:  LDAP is designed for a high read-to-write ratio (10:1 or 100:1 is most often quoted as optimal for LDAP based directories). For any Password Policy that tracks attempted authentications, the Directory Server must update data once for every read that checks passwords (i.e. any authentication attempt). Idle and maximum (a.k.a soft and hard) timeouts are another required feature. Even though the Policy Server caches information whenever possible, implementing timeouts require updates to the User DataStore so that the timeout information can be shared among all Policy Servers.  LDAP is an Access Protocol (LDAP = Lightweight DirectoryAccess Protocol) not a data store. LDAP data stores use some storage app, usually a RDBMS like H2, MySQL, Oracle or SQL Server) in a black-box configuration. The implementer must support this application and the additional backup, restore, sizing, HA and other Operational needs through the tools provided which is additional to their existing oprerations procedures and skills  Customization of the datastore for LDAP based datastores is complex and leads to applications reusing existing attributes to store data instead of correctly named attributes (like stateOrProvence) being reused for another attribute instead of a precisely named attribute name.  LDAP adds an additional layer of abstraction and latency to your application but really doesn’t add any advantage for his extra complexity. Applications such asWSO2 can access a JDBC baseddatastore or an LDAP datastore.  LDAP Connection Pooling support is non-existent or is very limited; this can be a scalability and performance concern.  LDAP is not a transactional protocol. Generally, Identity Management is closely coupled to other database transactions and the ability to have changes to the Identity Management user store and other schema participate in transactions is important. Not having transactions means rollbacks of an update requires a compensating transaction to “undo” the update.  LDAP and Directory Servers do not have DRI, locking, or check constraints even if the relational database the LDAP implementation is built on supports them.
  • 43. Architecturally, an LDAP/DirectoryServer solution has drawbacks compared to a relational database solution:  Directory Server data has limited DataTyping . There areStrings, Numbers (Integer), Time, Telephone Numbers, Boolean, Binary, Distinguished Name and Bit Strings data types in directory servers. Decimal (and all non-integer numeric) data and complex types (objects) must be stored as a string or serialized/deserialized and explicitly cast if used in any application (SQL, JavaVisual basic…). And there are limits on searchability and indexability (and indexing in general); especially for non-native data types . Relational database (like Oracle) datatypes map to Java SQL datatypes without any casts.  LDAP has no equivalent structure to stored procedures (and packages). It is desirable to have the SQL for data input and output abstracted from the calling applications to minimize the risk and impact to existing applications of future changes to the User DataStore. Decoupling the release cycles of the database and Business logic as much as possible is a more agile approach  A Directory Server has minimal Error Handling internally and externally error handlers must be coded and implanted in all ode that calls into the Directory Server. Relational databases’ Error Handling allows for better and more consistent exception handling, resolution, and logging and encapsulates these functions from the calling application.
  • 44.  Remember, you are writing code for other people, including (especially) your future self. They/you will have to debug or modify the code.  Commenting is necessary because you need to tell people what you intended to do and why you chose to do it a specific way.  While what the code does should be "self-evident" (an oxymoron usually) from inspection of the code, you need to communicate what you INTENDED to do; it is possible you made a logic error.  Comments also do NOT slow you down (as some people say) ; I’ve timed it. I spend at most 10 to 20 minutes commenting an entire class. It is impossible to argue that is not time well spent.  Comments are NOT counted as LOCs and absolutely do NOT add to maintainability costs; they do just the opposite.
  • 45.  Also, just as there are many ways to skin a cat (that is really an awful expression, isn't it?), there are many ways to implement the logic on how to fulfill a requirement.  I’m sure you always have an insightful and well- reasoned thought process behind why you implement a bit of logic in a certain way. You need to document in comments why you chose a specific implementation.  Commenting will answer questions without future maintainers guessing (and second-guessing)) your reasons and allow them to determine if the implementation is still the best implementation as the application evolves and business requirements are refined or changed over time
  • 46.  Not all classes need the same level of commenting  DTOs do not require much commenting, just a sentence or two that relates it to the other code  Implementations (like the 3 Password History classes in the previous example) often have more bytes of comments than code  Level of commenting in other classes vary
  • 47. Comment Content should be  What you intended to implement (the code shows what you did implement)  Explanations of how tricky and clever bits of logic work (for people not as smart as you)  What User Stories have the requirements you’re implementing  Design Decisions (for example: why you chose HashMap overTreeMap or LinkedHashMap) Err on the side of too much commenting
  • 48. I have a simple one class that illustrates the point. This is a quick “down and dirty” app that is meant to run from Eclipse. Evaluate the MontyHallProblem_NoComments.java version of the class first and then evaluate the MontyHallProblem.java code. GitHub Website: https://github.com/mgeiser/MontyHallProblem Git Repo: https://github.com/mgeiser/MontyHallProblem.git