• No results found

Building Secure Applications. James Tedrick

N/A
N/A
Protected

Academic year: 2021

Share "Building Secure Applications. James Tedrick"

Copied!
31
0
0

Loading.... (view fulltext now)

Full text

(1)

Building Secure Applications

James Tedrick

(2)

What We’re Covering Today: Accessing ArcGIS Resources

Portal ArcGIS ArcGIS Server

Web App Mobile App Server Topics covered:

• Using Token endpoints • Using OAuth/SAML

• User login • App login

Other session topics not covered:

• Securing Services • Designing Enterprise

Security Strategy

(3)

What We’re Covering Today: Accessing ArcGIS Resources

Portal ArcGIS ArcGIS Server

Web App Mobile App Server Token Generation

• Portal for ArcGIS • ArcGIS Server

• ArcGIS Online (legacy)

SAML/OAuth 2.0 • ArcGIS Online • User login • App login • Different workflows depending on application

(4)

Security Configuration

Portal ArcGIS

ArcGIS Server

• Outside direct developer control • Configured by GIS Admin • Specific to a given GIS site • Occurs at differing levels

• Application (ArcGIS Server) • Web Server (IIS)

• Verifies against a user store

• ArcGIS for Server internal store • AGO/Portal internal store

• External (Active Directory / LDAP) • Groups/roles can be stored elsewhere

(5)
(6)

ArcGIS Platform Security Locations

Data Application (Server/Portal) Web Internet

Web Tier

Application Tier: Server Application Tier: Portal Federated Server Server Portal Web Adaptor

(7)

Web Tier Authentication

Web Server (IIS / Tomcat) authenticates on request Web Adaptor / reverse proxy

Identity is transmitted from web tier to application tier Requires ArcGIS Server to have SSL enabled

Configuration:

- ArcGIS Server – set to ‘web tier’ authentication - IIS / Tomcat – disable anonymous access

Login types

- Integrated Windows Authentication (IWA) – Windows login ID - Basic / Digest – username/password dialog

(8)

Single Sign On (SSO)

Integrated Windows Authentication (IWA)

- Sign in once to Windows (i.e., login to your computer) - Supporting apps supplied with Windows credentials

ArcGIS Online / Portal for ArcGIS / Server

(9)

Public Key Infrastructure (PKI)

Federal identity standard

2 Factor authentication (Card & PIN)

- CAC card contains certificate

- User supplies PIN that is matched against card, certificate is forwarded to application

Issues

- HTTPS required

(10)

Application level authentication

Default for ArcGIS products

Web server MUST be configured for anonymous access

Authentication handled by services shipped with ArcGIS for Server / Portal ArcGIS Servers federated to Portal rely on Portal’s authentication results for

(11)

Token Authentication

After username / password submission, receive token string Use token with all REST requests as the ‘token’ parameter Tokens have a set lifetime (default/requested length)

Token Generation URLs:

- Portal Tokens: ArcGIS Online, Portal for ArcGIS, Federated ArcGIS for Server <PORTAL URL>/sharing/generateToken (e.g.,

http://myportal.mycompany.com/portal/sharing/generateToken) - Server Tokens: ArcGIS for Server

(12)

IdentityManager

Uniform class across web APIs for logging in

Automatically handles login process for all secured

services

Updates tokens to keep access current Issues:

- Only for services with token-based security - Presents multiple dialogs (1/server)

(13)

Embedding Authentication

Token lifespan – can be set during request

Token embedded within proxy – expose secured services

ArcGIS Online & Portal can store credentials and proxy on demand

Enables secured resources to be

displayed anonymously through select channels (using 2+ web adaptors)

Service with embedded authentication

(14)

Identity Manager

Proxies

(15)

SAML & OAuth:

ArcGIS Online

(16)

SAML - Security Assertion Markup Language

Separates Authentication (login) from Resources

(AGO)

ArcGIS Online can use an organization’s login

information (i.e., Active Directory)

Set up:

- ArcGIS Online (AGO org admin) - Login provider (enterprise admin)

Enables Single Sign-On into ArcGIS Online

From app developer perspective, process is uniform-

you interact with ArcGIS Online, not the identity provider

(17)

OAuth

Differentiates between application server, authentication

server

Authentication server logs user in, checks for user

acceptance of application

Application server does not see username/password as

they are entered

(18)

OAuth logins workflows

User login – User needs their own an ArcGIS Online account Application login – Users uses your ArcGIS Online account 2 endpoints used in processes

- https://www.arcgis.com/sharing/oauth2/authorize - https://www.arcgis.com/sharing/outh2/token

(19)

OAuth login key properties

Set up in ArcGIS Online’s Item Content or Developer Dashboard

- redirect_uri – resource to load when presenting new credentials - appId – unique ID of application in ArcGIS Online

- appSecret – secret key used with appId (appId’s ‘password’)

appSecret should never be exposed to user

- Including embedded in mobile application

(20)

Registering an app

(21)

OAuth logins – User logins

Access user’s data & maps Tasks consume user’s credits

Logins can be either ArcGIS or Enterprise (i.e., Active Directory, LDAP) Process by application type:

- Login in HTML/JS – 1 step (implicit grant)

1. Access /authorize, load resulting redirect containing token

- Login at application (iOS/Android) or web server (.Net/PHP) – 2 step (authorization grant)

1. Access /authorize, load resulting redirect with authorization code 2. Access /token with code, receive token

(22)

• ArcGIS Online does not contact Identity Provider directly

• Identity Provider only needs to be

seen by the client, not the internet

Warning:

Simplified Diagrams Ahead

ArcGIS Online

Your application server

All communication between ArcGIS Online and Identity Management occurs via client through redirects URLs 5* 3* Identity Provider 3 5

(23)

4. User logs in using login system 5. Login system authorizes user to AGO

6. ArcGIS Online gives application an access by loading redirect_uri with access token appended

User Login – Web Applications

ArcGIS Online

Your application server

1

6 2

1. Application loads into client

2. Application requests authorization by opening

https://www.arcgis.com/sharing/oauth2/authorize

3. ArcGIS Online redirects to organization login

5* 4

3*

(24)

User login

(25)

4. Login system redirects browser, providing authorization code

5. Application captures authorization code 6. Application requests access token from AGO

https://www.arcgis.com/sharing/outh2/token

7. AGO provides token

User Login – Desktop/Device App

ArcGIS Online

1. Through an embedded web browser, application requests authorization by opening

https://www.arcgis.com/sharing/oauth2/authorize

2. ArcGIS Online redirects to organization login page 3. User logs in using login system

1 3 4 5 6 7 2* Identity Management

(26)

5. Login system redirects browser, providing authorization code as uri parameter

6. Server gets authorization code from uri 7. Application requests access token from AGO

https://www.arcgis.com/sharing/outh2/token

8. AGO provides token

User Login – Server Applications

ArcGIS Online

Your application server

Identity Management

1. Application loads into client

2. Application requests authorization by opening

https://www.arcgis.com/sharing/oauth2/authorize

3. ArcGIS Online redirects to organization login page 4. User logs in using login system

2 4 5 1 6 7 8 3*

(27)

Application Login

Uses appID, appSecret as application ‘username’ & ‘password’

User is never aware of ArcGIS Online (aside from the documentation J) Developer’s responsibility to provide access controls

- Otherwise, you’re offering your credits to everyone!

What you can do:

- Access AGO tasks (Geocoding, routing, etc.)

- Access application owner’s private items stored in ArcGIS Online - Search public items in ArcGIS Online ( NOT Organizational )

(28)

4. Client requests an operation that makes use of AGO resources

5. Server requests resources with token 6. ArcGIS Online provides response

7. Possible further processing; response is delivered to client

Application Login

ArcGIS Online

Your application server

1. Application requests authorization by opening

https://www.arcgis.com/sharing/oauth2/token

(normally done independent of user interactions) 2. ArcGIS Online provides a token

3. Application loads into client 7

4 1 2 5 6 3

(29)

Application Login

(30)

Resources

Presentation Samples:

- IdentityManager Information:

https://developers.arcgis.com/javascript/jsapi/identitymanager-amd.html

- Proxy Information: https://developers.arcgis.com/javascript/jshelp/ags_proxy.html - OAuth User Login:

https://developers.arcgis.com/en/javascript/jssamples/portal_oauth_inline.html

- Application Login demo: https://github.com/tedrick/appIDexample

Developer Page: https://developers.arcgis.com/en/authentication/index.htmlJS Application Boilerplate: https://github.com/Esri/application-boilerplate-js JS Sample: iOS Sample: https://github.com/Esri/OAuth2-Demo-iOS

(31)

References

Related documents

Since the GroundVehicle class is derived from the Vehicle class, a Vehicle type variable can be used to hold a GroundVehicle type object, like we’ve done in

To assess the relationship of gender patterns of suicidal behaviour between immigrants and natives in their country of origin, we used the established rates of completed suicide for

We operate in five main industries within the live entertainment business, including live music events, venue operations, ticketing services, sponsorship and advertising sales

ArcGIS cloud product spectrum ArcGIS Server On Private Cloud ArcGIS Server On Amazon Web Services ArcGIS Online Manage it Yourself High Low.. ArcGIS in the Cloud

• Request Online Credit Card Module • Verify Credit Card Module Setup • Receive Payment.. o Decline Messages • Reverse Payment / Void Payment • Refunding a

Estos resultados corroboran los hallazgos de los estudios, que encontraron que una baja autoestima constituye un factor de riesgo para el consumo de alcohol, es

• ArcGIS Online: Provides a common platform for ArcGIS users to discover, share, and build GIS applications, services, and content.. • Jump-start your GIS projects without

The physical connection between the token and the computer enables these tokens to be used for multiple security applications such as secure local and remote network access,