OpenMic ISAM API Protection 16aug2017
OpenMic ISAM API Protection 16aug2017
OAUTH 2.0
OAuth Overview
OAuth Terminology
OAuth Roles
Grant Types
Implicit Flow
2 IBM Security
What is OAuth?
OAuth is an HTTP based authorization protocol that provides 3rd party applications scoped access to
protected resources on behalf of the resource owner. This allows private resources to be shared
between sites without obtaining a username and password.
ISAM support OAuth 2.0 authentication and strictly follows the OAuth standards.
3 IBM Security
OAuth Terminology that you should know.
Authentication
Authorization
Access Token
Refresh Token
Authorization Code
Scope
Grant
4 IBM Security
OAuth Roles
Resource Server
Resource Owner
Client
Authorization server
5 IBM Security
Popular OAuth Grant Types
Authorization Code
Most appropriate for server-side web applications
Authorization code is obtained and exchanged for an access token
6 IBM Security
Enabling OAuth in Webseal
Edit the oauth-auth field in the Webseal configuration file. This can be set to HTTP, HTTPS, or both
depending on your requirements. Once this has been updated, save the file.
Using oauth-eas is another option but not recommended since it does not allow fine-grain
authentication.
7 IBM Security
Enabling API Protection for AAC
8 IBM Security
Creating an API Definition and Client
9 IBM Security
Requesting an Authorization Code
Authorization endpoint
An authorization URL where the resource owner grants authorization to the OAuth client to access the protected
resource.
http://server.oauth.com/mga/sps/oauth/oauth20/authorize
Example
10 IBM Security
Authenticate and Consent to Receive Authorization Code
11 IBM Security
Authorization Code Generated Without a Redirect URI
12 IBM Security
Authorization Code Generated with a Redirect URI
13 IBM Security
Exchanging an Authorization Code for an Access Token
Token endpoint
A token request URL where the OAuth client exchanges an authorization grant for an access token and an optional
refresh token.
http://server.oauth.com/mga/sps/oauth/oauth20/token
Example
14 IBM Security
Accessing the Protected Resource with the Access Token
15 IBM Security
Requesting an Access Token for Implicit Flow
16 IBM Security
Authenticate and Consent to Obtain an Access Token
17 IBM Security
Access Token Generated with a Redirect URI
18 IBM Security
Accessing the Protected Resource with the Access Token
19 IBM Security
OAuth Mapping Rules
The PreToken rule is called before a OAuth token is generated and typically used for validation.
Username/Password validation
LDAP
HTTP callout method
Limit the number of tokens or grants
Restrict Introspect endpoint (confidential clients)
The PostToken rule is called after an OAuth token is generated and used to modify the token.
Associate attributes with the token
HTTP Client example
Delete a token from cache
Restrict Introspect endpoint (validate token ownership)
20 IBM Security
OAuth Mapping Rule Methods
Use the mapping rule methods to link an attribute key-value pair to the authorization grant state ID.
associate - Associates the attribute key-value pair to the authorization grant state ID.
getAssociation Get the attribute value from the authorization grant state ID and attribute key.
https://www.ibm.com/support/knowledgecenter/SSPREK_9.0.3/com.ibm.isam.doc/config/referen
ce/ref_oauth_mapping_rule_methods.html#ref_oauth_mapping_rule_methods
21 IBM Security
HEADER CONTENT 1 | HEADER CONTENT 2
Example
22 IBM Security
QUESTIONS?
23 IBM Security
THANK YOU
FOLLOW US ON:
ibm.com/security
securityintelligence.com
xforce.ibmcloud.com
@ibmsecurity
youtube/user/ibmsecuritysolutions
Copyright IBM Corporation 2017. All rights reserved. The information contained in these materials is provided for informational purposes only, and is provided AS IS without warranty of any kind, express
or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, these materials. Nothing contained in these materials is intended to, nor shall have the effect of,
creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in these
materials to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and / or capabilities referenced in these materials may
change at any time at IBMs sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. IBM, the IBM logo, and
other IBM products and services are trademarks of the International Business Machines Corporation, in the United States, other countries or both. Other company, product, or service names may be trademarks
or service marks of others.
Statement of Good Security Practices: IT system security involves protecting systems and information through prevention, detection and response to improper access from within and outside your enterprise.
Improper access can result in information being altered, destroyed, misappropriated or misused or can result in damage to or misuse of your systems, including for use in attacks on others. No IT system or
product should be considered completely secure and no single product, service or security measure can be completely effective in preventing improper use or access. IBM systems, products and services are
designed to be part of a lawful, comprehensive security approach, which will necessarily involve additional operational procedures, and may require other systems, products or services to be most effective.
IBM DOES NOT WARRANT THAT ANYSYSTEMS, PRODUCTS OR SERVICES ARE IMMUNE FROM, OR WILL MAKE YOUR ENTERPRISE IMMUNE FROM, THE MALICIOUS OR ILLEGAL CONDUCT
OF ANY PARTY.