Authentication How do I choose? Les Vogel google.com/+LesVogel twitter: lesv

Agenda

Definitions & Considerations

Roll your own

Google Choices

Definitions Authentication (AuthN) – Verifying Identity Authorization (AuthZ) – What an authenticated user is allowed to do. Credentials – a document or certificate proving a person's identity or qualifications. Confidentiality – No one but the intended parties gain access Data Integrity – Prevent Tampering PII – Personally identifiable information is any data that could potentially identify a specific individual.

Definitions Encryption HMAC – Hash based Message Authentication - A secure way to validate the authenticity of messages. Salt – Random data that is used as an additional input to a one-way function that hashes a password or passphrase. The primary function of salts is to defend against dictionary attacks versus a list of password hashes and against pre-computed rainbow table attacks.

   Some Considerations

Platforms • • • • •

Computer Web Android iOS Device (IoT)

What do I need?

Auth Providers • •

• •

Own 3rd party Identity Providers Federated Login Anonymous

• • • • •

Email address Name Location Other PII Access to user owned data

Other • • •

Must they login? Multi-factor auth Password Change / Recovery

Agenda

Definitions & Considerations

Roll your own

Google Choices

What are we trying to do?

What can go wrong?

Encryption • • • •

No encryption Everyone has the same Key No SALT Broken algorithms

Software Engineering

User / Social • • • •

Collect too much PII Lost Passwords Lost Accounts Changed email

• • •

Long lasting tokens Not acting on all errors Not checking Time

Roll your own Auth (Tips) • •



DON'T – Roll your own SCrypt (password, salt, N, r, p, dkLen) – Key Derivation Function -- Adjustable Cost model • Memory Hard Algorithm -- expensive to brute force • N – CPU / Memory cost (N=2^?:<2^(16*r)) • r – Blocksize; p – Parallelization • SALT needs to be a good random source • IETF draft-josefsson-scrypt-kdf-03 • N = 2^20, r = 8, p = 1 (was good in 2009) JSON Web Tokens (jwt.io) are useful format for tokens • header.payload.hmac(header.payload,secret) • RFC 7519 • Always verify



Include expires time in payload & check it.

Roll your own Auth (Tips) • •

Use Auth Tokens and Refresh tokens Pass in HTTP headers, not in URL's – we use: Authorization: Bearer

1/fFBGRNJru1FQd44AzqT3Zg

(keep this stuff out of log files) • • •

You may wish to send via parallel ways to keep to help prevent CSRF / XSRF and other stuff. Be Paranoid. DON'T DO THIS – Really!

Agenda

Definitions & Considerations

Roll your own

Google Choices

Google Offerings iOS

Web

Google Sign-In

X

X

X

Google Identity Toolkit

X

X

X

OAuth 2.0

X

X

X

Google Apps Domain-Wide Firebase SmartLock for Passwords

X X

X

X

Server to Server

Google Scopes X Scales Well, Very large volume.

X

X

X

X

Delegation of Authority

X

Authenticate w/ Frontend code only Cross device authentication

Definitions OAuth 2.0 Authorization Code - From resource Owner, (note request starts at Auth Server) saying, it's ok if you use my resource. Access Token – Short lived Token that can be used for service (Google API, your own) Refresh Token – 1 time Token that can be exchanged for a new Access / Refresh Tokens Service Accounts – For Server-to-Server interaction, these accounts belong to an application. 2 Legged OAuth (2LO) – Server-to-Server authentication Typically used for App level access / data. (Trusted Secrets possessed by client.) 3 Legged OAuth (3LO) – Client talks to both a Consumer App and an Authentication server typically to allow the Consumer App to act on behalf of the Client in accessing resources. OpenID Connect – OpenID Connect 1.0 is a simple identity layer on top of the OAuth 2.0 protocol. It allows Clients to verify the identity of the End-User based on the authentication performed by an Authorization Server, as well as to obtain basic profile information about the End-User in an interoperable and REST-like manner.

2 Party and 3 Party Auth 2 Party Auth (2LO)

3 Party Auth (3LO) User

App

App

“I’m that app.” “I’m this user. Let that app use this part of my data. Google

“I’m that app.”

Google

OAuth 2.0 and OpenID Connect • • • • • • •

Web Applications Server to Server applications Use Google APIs from web applications that do not let users sign in with their Google accounts. Use Google APIs in applications that are installed on devices such as computers and mobile devices that are not based on Android or iOS. Use Google APIs from applications that use service accounts to access the applications' own data, rather than users' data. OAuth 2.0 - authorization Cross Client Identity

Google Sign-In • •

• •

Well established, many users Easy to use - very small amount of code • Android • iOS • Web Gives access to Google Resources OpenID Connect style tokens

Google Identity Toolkit • • • • • • • • •

Google Turnkey Identity as a Service (IdaaS) Robust and Secure Easy to use and setup for what you get. Federated Login • Google, Paypal, Facebook, Microsoft, AOL, Yahoo Password-based authentication, using one API. Import your existing credential database Login Flow Sign-up Flow Scales well

Google Identity Toolkit

Google Identity Toolkit

Google Apps Domain-wide Delegation of Authority • •



Provide enterprise Google Apps accounts the ability to grant third party applications domainwide access to their users' data. Supports domain administrators managing user accounts. If you are using App Engine to access Google Apps or Google for Work APIs, you can create a service account with domain-wide delegation of authority. This allows domain administrators the ability to grant third party applications domain-wide access to its users' data. Uses Service Accounts to allow apps to access user data.

Firebase Auth • • • •

Easy to use / easy to get started Social Login – Facebook, Twitter, GitHub, Google User Management: Email & Password Authenticates w/ just frontend code

Default Auth • •

• • •

GOOGLE_APPLICATION_CREDENTIALS environment variable with path to JSON file gcloud auth – hidden file • Windows – %APPDATA%/gcloud/application_default_credentials.json • Others – $HOME/.config/gcloud/application_default_credentials.json GAE AccessToken GCE fetches credentials from the metadata server. Typically it's just: GoogleCredential.getApplicationDefault()

cloud.google.com Images by Connie Zhou

cloud.google.com

Authentication - How do I choose-.pdf

3rd party. Identity. Providers. • Federated Login. • Anonymous. • Email address. • Name. • Location. • Other PII. • Access to user. owned data. • Must they login?

2MB Sizes 1 Downloads 181 Views

Recommend Documents

How-Do-I-See-Myself.pdf
_____I effectively communicate thoughts and ideas. _____I make positive contributions to lessons/discussions. _____I deal with problems, arguments, or fights ...

How Do I Register.pdf
Proof of Address...either a utility (power/gas or. water bill) or lease or mortgage agreement. • Picture ID...usually a driver's license. • Withdrawal from former ...

Electoral Commission, How do I register?
You can check your registration details by: • sending an SMS with your ID number to 32810 or. • using our voter registration details web page. If your application ...

Electoral Commission, How do I register?
When can I register? You can apply for registration at any time however, to be able to vote in a specific election ... using our voter registration details web page.

I Do, I Don t
Book Synopsis. The Bachelor meets The Runaway Bride in this addictive romance novel about a reality TV producer falling for her would-be star: a Montana.

How Much Do I Qualify For.pdf
Your monthly housing cost (PITI) plus other long-term debt should not ... hand, savings and checking accounts, CDs, stocks, bonds or any other type ... The home you are planning to purchase will be appraised to determine the market value.

HOW DO I SPEND MY TIME PROJECT.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. HOW DO I ...

onlinesbi.com-How do i register retail Internet banking.pdf ...
... branch code click the Get. Branch Code link to retrieve the branch code based on the location and branch name. Select your country. Enter the mobile number registered in your branch. Select the Internet banking facility you require: Full or Limit

how do i electronically sign a pdf
Download. Connect more apps... Try one of the apps below to open or edit this item. how do i electronically sign a pdf. how do i electronically sign a pdf. Open.

1499501333738-using-adespresso-how-do-i-coterie-up-an-email ...
... After That Affiliate. Marketers. Page 2 of 2. 1499501333738-using-adespresso-how-do-i-coterie-up-a ... eting-discernment-weapon-for-affiliate-marketers.pdf.

how do i cite a pdf
Page 1 of 1. File: How do i cite a pdf. Download now. Click here if your download doesn't start automatically. Page 1 of 1. how do i cite a pdf. how do i cite a pdf. Open. Extract. Open with. Sign In. Main menu. Displaying how do i cite a pdf. Page 1

TLKT1006-2013-05May-ThinkSayDo-how-do-I-steward-manage-my ...
Connect more apps... Try one of the apps below to open or edit this item. TLKT1006-2013-05May-ThinkSayDo-how-do-I-steward-manage-my-talents-poster.pdf.

1499501333738-using-adespresso-how-do-i-coterie-up-an-email ...
2. Loading… Page 1 of 2. Page 2 of 2. 1499501333738-using-adespresso-how-do-i-coterie-up-a ... eting-discernment-weapon-for-affiliate-marketers.pdf.

How do I look Expert NO LISTENING.pdf
Now I don't feel right in (3) ... clothes, so even at the weekends I still wear the same kind of thing.' 1 A fitted B shaped C created. 2 A appearance B impression C ...

pdf-1896\neuroimmunology-what-do-i-do-now-paperback ...
... apps below to open or edit this item. pdf-1896\neuroimmunology-what-do-i-do-now-paperback-2012-by-aaron-e-miller-from-oxford-university-press.pdf.

pdf-135\everything-i-do-i-do-it-for-you-from-robin-hood ...
There was a problem loading this page. pdf-135\everything-i-do-i-do-it-for-you-from-robin-hood-prince-of-thieves-sheet-piano-vocal-chords-recorded.pdf.

I Have A Tick Bite, What do I do Now.pdf
Sign in. Loading… Whoops! There was a problem loading more pages. Retrying... Whoops! There was a problem previewing this document. Retrying.