SlideShare uma empresa Scribd logo
1 de 61
Baixar para ler offline
Developer Tutorial:
WebAuthn for Web &
FIDO2 for Android
Christiaan Brand, Product Manager: Identity &
Security, Google
1
All Rights Reserved • FIDO Alliance • Copyright 2019
All Rights Reserved • FIDO Alliance • Copyright 2019 2
codelabs.developers.google.com/codelabs/webauthn-reauth/
Codelab 1: Your First WebAuthn
All Rights Reserved • FIDO Alliance • Copyright 2019
1. Introduction
3
What is WebAuthn? What is FIDO2?
The FIDO2 / WebAuthn allows you to create and use strong, attested public key based credentials for the purpose of authenticating users.
The API supports the use of BLE, NFC, and USB roaming authenticators (security keys) as well as a platform authenticator, which allows the
user to authenticate using their fingerprint or screenlock.
What you'll build...
In this codelab, you are going to build a website with a simple re-authentication functionality using fingerprint sensor. Re-authentication is a
concept where a user signs into a website once, then authenticate again as they try to enter important sections of the website, or come back
after a certain interval, etc in order to protect the account.
What you'll learn...
You will learn how to call the WebAuthn API and options you can provide in order to cater various occasions. You will also learn re-auth
specific best practices and tricks.
Note: In this codelab, you won't learn how to build a FIDO server.
What you'll need...
• Hardware (one of following)
• Android device with a fingerprint sensor (even without a fingerprint sensor, screenlock can provide equivalent user verification
functionality)
• Touch ID enabled MacBook Pro / Air
• Windows 10 (Build 1903 or later) with Windows Hello
• Browser
• Google Chrome (Or any other browsers supporting WebAuthn)
All Rights Reserved • FIDO Alliance • Copyright 2019
2. Getting Set Up
4
To work on this codelab, we'll be using a service called glitch. This is where you can edit both client and server side code
using JavaScript and deploy them instantly. Head to the following URL: https://glitch.com/edit/#!/webauthn-codelab-start
See how it works at the beginning
Let's see the initial state of the website first. Click "Show" at the top and press "Next to The Code" to see the live website
side by side.
1. Enter a username and submit (no registration is required, any username will create a new account)
2. Enter a password and submit (password will be ignored and user will be authenticated nevertheless)
3. User lands at home page. Clicking "Sign out" will sign you out. Clicking "Try reauth" sends you back to 2.
What are we going to implement?
1. Let users register a "user verifying platform authenticator" (the Android phone with fingerprint sensor itself can act as
one).
2. Let users re-authenticate themselves to the app using their fingerprint.
You can preview what you are going to build from here.
Remix the code
In https://glitch.com/edit/#!/webauthn-codelab-start find "Remix to Edit" button at the top right corner. By pressing the
button, you can "fork" the glitch and continue with your own version of the project with a new URL.
All Rights Reserved • FIDO Alliance • Copyright 2019
3. Register a credential using a fingerprint
5
You first need to register a credential generated by a user verifying platform authenticator - an authenticator
that is embedded onto the platform and verifies the user identity using biometrics or screenlock.
We are adding this feature to the
/home page.
All Rights Reserved • FIDO Alliance • Copyright 2019 6
Create registerCredential()function
Let's create a function called registerCredential() which registers a credential using a fingerprint.
All Rights Reserved • FIDO Alliance • Copyright 2019 7
Feature detection
Now, let's add WebAuthn code. First thing you should do is to detect whether WebAuthn is available. We can achieve this
by examining if window.PublicKeyCredential exists. We'll throw an exception if the feature is not available.
Is User Verifying Platform Authenticator available?
Re-auth is most useful when the authenticator is a user verifying platform authenticator and that is what we will use.
There's a handy function that can detect if there is a user verifying platform authenticator available called
PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable(). If it's not available, throw an exception.
All Rights Reserved • FIDO Alliance • Copyright 2019 8
Obtain the challenge and other option from server endpoint:
/auth/registerRequest
Before asking the user to provide a credential using fingerprint, ask the server to send back a challenge
and other parameters. Call _fetch()with opts as an argument to send a POST request to the server.
Here's an example options you will be receiving
(aligns with PublicKeyCredentialCreationOptions).
All Rights Reserved • FIDO Alliance • Copyright 2019 9
To learn about these options, see the official specification of the WebAuthn. Some
important ones are explained at "Register a credential" section in the next page.
All Rights Reserved • FIDO Alliance • Copyright 2019 10
Create a credential
Because these options are delivered encoded in order to go through HTTP protocol, you have to convert some parameters
back to binary - specifically, user.id, challenge and id s included in excludeCredentials array:
And finally call the navigator.credentials.create() method in order to create a new credential. With this call,
the browser will interact with the authenticator and tries to verify the user's identity using a fingerprint sensor or a
screenlock.
All Rights Reserved • FIDO Alliance • Copyright 2019 11
Once the user verifies their identity, you should be receiving a credential object you can send to the server and register
the authenticator.
All Rights Reserved • FIDO Alliance • Copyright 2019 12
Register the credential to the server endpoint: /auth/registerResponse
Here’s an example credential object you should have received.
Like when you received an option object for registering a credential, you should encode the binary parameters of the credential
so that it can be delivered to the server as a string.
All Rights Reserved • FIDO Alliance • Copyright 2019 13
Store the credential id locally so that we can use it for authentication when the user comes back.
Finally, send the object to the server and if it returns HTTP code 200, consider the new credential has
been successfully registered.
Congratulations, you now have the complete registerCredential()function!
All Rights Reserved • FIDO Alliance • Copyright 2019
4. Build the UI to register, get and remove
credentials
14
It will be nice to have a list of registered credentials along with buttons to remove them.
Build UI placeholder
Let's add UI to list credentials and a button to register a new credential. ul#list will be the placeholder for
adding a list of registered credentials
All Rights Reserved • FIDO Alliance • Copyright 2019 15
Get a list of credentials and display: getCredentials()
Let's create getCredentials()function so you can get registered credentials and display them in a list. Luckily, we
already have a handy endpoint on the server /auth/getKeys which you can fetch registered credentials for the signed-
in user.
The returned JSON includes credential information such as id and publicKey. By building HTML you can show them to the
user.
All Rights Reserved • FIDO Alliance • Copyright 2019 16
Note: We are using a library called "lit-html" for handy template building. See lit-html project page
to learn more, if you are interested.
Let's display available credentials as soon as user lands on /home by invoking
getCredentials().
All Rights Reserved • FIDO Alliance • Copyright 2019 17
Remove the credential: removeCredential()
In the list of credentials, you have added a button to remove each credential. By sending a request
to /auth/removeKey along with credId query parameter, you can remove them.
All Rights Reserved • FIDO Alliance • Copyright 2019 18
Register a credential
Finally, call registerCredential()to register a new credential when (+) button is clicked. Don't forget to
renew the credential list by calling getCredentials()after registration.
Import registerCredential from client.js we created earlier:
All Rights Reserved • FIDO Alliance • Copyright 2019 19
Following is important options to remember to pass in
registerCredential()(PublicKeyCredentialCreationOptions we referred earlier).
All Rights Reserved • FIDO Alliance • Copyright 2019 20
attestation Preference for attestation conveyance (none, indirect or
direct). Choose none unless you need one.
excludeCredentials Array of credential descriptors so that the authenticator can
avoid creating duplicate ones.
authenticatorSelection authenticatorAttachment Filter available authenticators. If you want
an authenticator attached to the device,
use "platform". For roaming
authenticators, use "cross-platform".
requireResidentKey Use true if the created credential should
be available for future "account picker"
UX.
userVerification Determine whether authenticator local
user verification is "required", "preferred"
or "discouraged". If you want fingerprint or
screenlock auth happen, use "required".
All Rights Reserved • FIDO Alliance • Copyright 2019
5. Authenticate the user with a fingerprint
21
We now have a credential registered and ready to use it as a way to authenticate the user. Let's add re-auth functionality
to the website. Here's the user experience:
As soon as a user lands on /reauth, the website asks for re-auth using a fingerprint. When the user succeeds to
authenticate, forward the user to /home, otherwise fallback to use the existing form to enter and submit a password.
All Rights Reserved • FIDO Alliance • Copyright 2019 22
Create authenticate() function:
Let's create a function called authenticate()which verifies user identity using a fingerprint. We'll be adding JavaScript code here.
Feature detection and User Verifying Platform Authenticator check
We can replicate the same behavior we did on registration.
All Rights Reserved • FIDO Alliance • Copyright 2019 23
Obtain the challenge and other options from server endpoint: /auth/signinRequest
Before authenticating, let's examine if the user has a stored credential id and set it as a query param if they do. By
providing a credential id along with other options, the server can provide relevant allowCredentials and this will make
user verification reliable.
All Rights Reserved • FIDO Alliance • Copyright 2019 24
Before asking the user to authenticate, ask the server to send back a challenge and other parameters. Call _fetch()with opts as an
argument to send a POST request to the server.
Here's an example options you should be receiving (aligns with PublicKeyCredentialRequestOptions).
All Rights Reserved • FIDO Alliance • Copyright 2019 25
Note: To learn about these options, see the official specification of the WebAuthn.
All Rights Reserved • FIDO Alliance • Copyright 2019 26
Locally verify the user and get a credential
Because these options are delivered encoded in order to go through HTTP protocol, you have to convert some parameters
back to binary - specifically, challenge and ids included in allowCredentials array:
All Rights Reserved • FIDO Alliance • Copyright 2019 27
Once the user verifies their identity, you should be
receiving a credential object you can send to the server
and authenticate the user.
All Rights Reserved • FIDO Alliance • Copyright 2019 28
Verify the user identity: /auth/signinResponse
Here's an example credential object you should have received.
Again, encode the binary parameters of the credential so that it can be delivered to the server as a string.
All Rights Reserved • FIDO Alliance • Copyright 2019 29
All Rights Reserved • FIDO Alliance • Copyright 2019 30
Finally, send the object to the server and if it returns HTTP code 200, consider the user has been successfully
signed-in.
Congratulations, you now have the complete authencation()function!
Don't forget to store the credential id locally so that we can use it for authentication when the
user comes back.
All Rights Reserved • FIDO Alliance • Copyright 2019
6. Enable reauth experience
31
To enable the reauth step, all you need is to run the authentication()as soon as user lands /reauth.
Import authenticate from client.js we created earlier.
Invoke authenticate()immediately.
All Rights Reserved • FIDO Alliance • Copyright 2019
7. Congratulations!
32
You have successfully finished the codelab - Your first WebAuthn.
What you’ve learned
• How to register a credential using a user verifying platform authenticator.
• How to authenticate a user using a registered authenticator.
• Available options for registering a new authenticator.
• UX best practices for reauth using a biometric sensor.
Next step
• Learn how to build similar experience in Android native app using FIDO2 API.
• Learn how to associate a website and an Android app and share credentials between them using the
Digital Asset Links.
You can learn both by trying out the Your first Android FIDO2 API codelab!
All Rights Reserved • FIDO Alliance • Copyright 2019 33
Resources
• WebAuthn specification
• Introduction to WebAuthn API
• FIDO WebAuthn Workshop
• WebAuthn Guide: DUOSEC
Special thanks to Yuriy Ackermann from FIDO Alliance for your help.
All Rights Reserved • FIDO Alliance • Copyright 2019 34
Codelab 2: Your First Android FIDO2 API
https://codelabs.developers.google.com/codelabs/fido2-for-android/#0
All Rights Reserved • FIDO Alliance • Copyright 2019
Introduction
35
What is the FIDO2 API?
The FIDO2 API allows Android applications to create and use strong, attested public key-based credentials for the purpose of
authenticating users. The API provides a WebAuthn Client implementation, which supports the use of BLE, NFC, and USB roaming
authenticators (security keys) as well as a platform authenticator, which allows the user to authenticate using their fingerprint or
screenlock.
What you'll build...
In this codelab, you are going to build an Android app with a simple re-authentication functionality using fingerprint sensor. "Re-
authentication" is a concept where user signs into an app once, then authenticate again when they come back to your app, or
trying to access an important section of your app.
What you'll learn...
You will learn how to call the Android FIDO2 API and options you can provide in order to cater various occasions. You will also
learn re-auth specific best practices.
Note: In this codelab, you won't learn how to build a FIDO server.
What you'll need...
Android device with a fingerprint sensor (even without a fingerprint sensor, screenlock can provide equivalent user verification
functionality)
Android OS 7.0 or later with latest updates. Make sure to register a fingerprint (or screenlock).
All Rights Reserved • FIDO Alliance • Copyright 2019
2. Getting Setup
36
Clone the Repository
Check out the GitHub repository.
https://github.com/googlecodelabs/fido2-codelab
What are we going to implement?
• Let users register a "user verifying platform authenticator" (the Android phone with fingerprint sensor itself will act as one).
• Let users re-authenticate themselves to the app using their fingerprint.
You can preview what you are going to build from here.
Start your codelab project
The completed app sends requests to a server at https://webauthn-codelab.glitch.me. You may try web version of the same app
there.
All Rights Reserved • FIDO Alliance • Copyright 2019 37
You are going to work on your own version of the app.
1. Go to the edit page of the website at https://glitch.com/edit/#!/webauthn-codelab.
2. Find "Remix to Edit" button at the top right corner. By pressing the button, you can "fork" the code and continue with
your own version along with a new project URL.
3. Copy the project name on top left (you may modify it as you want).
All Rights Reserved • FIDO Alliance • Copyright 2019 38
4. Paste it to the .env file's HOSTNAME section in glitch.
All Rights Reserved • FIDO Alliance • Copyright 2019
3. Associate your app and a website with
the Digital Asset Links
39
To use FIDO2 API on an Android app, associate it with a website and share credentials between them. To do so, leverage
the Digital Asset Links. You can declare associations by hosting a Digital Asset Links JSON file on your website, and adding
a link to the Digital Asset Link file to your app's manifest.
Host .well-known/assetlinks.json at your domain
You can define an association between your app and the website by creating a JSON file and put it at .well-
known/assetlinks.json. Luckily, we have a server code that displays assetlinks.json file automatically, just by
adding following environment params to the .env file in glitch:
• ANDROID_PACKAGENAME: Package name of your app (com.example.android.fido2)
• ANDROID_SHA256HASH: SHA256 Hash of your signing certificate
In order to get the SHA256 hash of your developer signing certificate, use the command below. The default password of
the debug keystore is "android".
All Rights Reserved • FIDO Alliance • Copyright 2019 40
By accessing https://<your-project-name>.glitch.me/.well-known/assetlinks.json, you
should see a JSON string like this:
All Rights Reserved • FIDO Alliance • Copyright 2019 41
Open the project in Android Studio
Click "Open an existing Android Studio project" on the welcome screen of Android Studio.
Choose the "android" folder inside the repository check out.
All Rights Reserved • FIDO Alliance • Copyright 2019 42
Associate the app with your remix
Open gradle.properties file. At the bottom of the file, change the host URL to the Glitch remix you just
created.
At this point, your Digital Asset Links configuration should be all set.
All Rights Reserved • FIDO Alliance • Copyright 2019
4. See how the app works now
43
Let's start by checking out how the app works now. Make sure to select "app-start" in the run configuration combobox. Click "Run" (the
green triangular next to the combobox) to launch the app on your connected Android device.
When you launch the app you'll see the screen to type your username. This is UsernameFragment. For the purpose of demonstration,
the app and the server accept any username. Just type something and press "Next".
All Rights Reserved • FIDO Alliance • Copyright 2019 44
The next screen you see is AuthFragment. This is where the user can sign in with a password. We will later add a feature to sign in with
FIDO2 here. Again, for the purpose of demonstration the app and the server accept any password. Just type something and press "Sign In".
All Rights Reserved • FIDO Alliance • Copyright 2019 45
This is the last screen of this app, HomeFragment. For now, you only see an empty list of credentials here. Pressing "Reauth" takes you back
to AuthFragment. Pressing "Sign Out" takes you back to UsernameFragment. The floating action button with "+" sign doesn't do anything
now, but it will initiate registration of a new credential once you have implemented the FIDO2 registration flow.
All Rights Reserved • FIDO Alliance • Copyright 2019 46
Before starting to code, here's a useful technique. On Android Studio, press "TODO" at the bottom. It will show a list of all
the TODOs in this codelab. We'll start with the first TODO in the next section.
All Rights Reserved • FIDO Alliance • Copyright 2019
5. Register a credential using a fingerprint
47
In order to enable authentication using a fingerprint, you'll first need to register a credential generated by a user verifying platform
authenticator - a device-embedded authenticator that verifies the user using biometrics, such as a fingerprint sensor.
As we have seen in the previous section, the floating action
button doesn't do anything now. Let's see how we can register
a new credential.
All Rights Reserved • FIDO Alliance • Copyright 2019 48
Call the server API: /auth/registerRequest
Open AuthRepository.kt and find TODO(1).
Here, registerRequest is the method that is called when the FAB is pressed. We'd like to make this
method call the server API /auth/registerRequest. The API returns all the
PublicKeyCredentialCreationOptions that the client needs to generate a new credential. It also
returns a challenge as a string. We need this for a subsequent API call of /auth/registerResponse, so let's
save this in a local property.
We can then call getRegisterIntent with said options. This FIDO2 API returns an Android Intent to open a
fingerprint dialog and generate a new credential.
Now we have the Intent, all we have to do is to pass it back to our UI so it can proceed to show the
fingerprint dialog. The method returns a MutableLiveData. We can simply post the Intent as the
LiveData’s value.
All Rights Reserved • FIDO Alliance • Copyright 2019 49
The method will then look like something below.
All Rights Reserved • FIDO Alliance • Copyright 2019 50
Open the fingerprint dialog for registration
Open HomeFragment.kt and find TODO(2).
This is where the UI gets the Intent back from our AuthRepository. The returned object has a convenient method
called launchPendingIntent. Calling it will open a dialog for credential generation.
All Rights Reserved • FIDO Alliance • Copyright 2019 51
Call the server API: /auth/registerResponse
Open AuthRepository.kt and find TODO(3).
This registerReponse method is called after the UI successfully generated a new credential. The parameter data has all the information about
this new credential. We want to send it back to the server.
First, we have to extract an AuthenticatorAttestationResponse from the data. The data Intent has an extra field of byte array with the key
Fido.FIDO2_KEY_RESPONSE_EXTRA. You can use a static method in AuthenticatorAttestationResponse called deserializeFromBytes to
turn the byte array into an AuthenticatorAttestationResponse object.
The AuthenticatorAttestationResponse object has information about the newly generated credential inside. We now want to remember the
ID of our local key so we can distinguish it from other keys registered on the server. In the AuthenticatorAttestationResponse object, take
its keyHandle property and save it in a local string variable as using toBase64.
Now we are ready to send the information to the server. Use api.registerReponse to call the server API and send the token, the challenge
string and the response. The returned value is a list of all the credentials registered on the server, including the new one.
Finally, we can save the results in our SharedPreferences. The list of credentials should be saved with the key PREF_CREDENTIALS as a
StringSet. You can use toStringSet to convert the list of credentials into a StringSet.
In addition, we save the credential ID with the key PREF_LOCAL_CREDENTIAL_ID.
All Rights Reserved • FIDO Alliance • Copyright 2019 52
All Rights Reserved • FIDO Alliance • Copyright 2019 53
Run the app, and you will be able to click on the FAB and register a new credential.
All Rights Reserved • FIDO Alliance • Copyright 2019
6. Authenticate the user with a fingerprint
54
We now have a credential registered on the app and the server. We can now use it to let the user sign in. We are adding
fingerprint sign-in feature to AuthFragment. When a user lands on it, it shows a fingerprint dialog. When the
authentication succeeds, the user to redirected to HomeFragment.
Call the server API: /auth/signinRequest
Open AuthRepository.kt and find TODO(4).
This signinRequest method is called when AuthFragment is opened. Here, we want to request the server and see if we
can let the user sign in with FIDO2.
First, we have to retrieve PublicKeyCredentialRequestOptions from the server. Use api.signInRequest to
call the server API. It returns two values, PublicKeyCredentialRequestOptions and a challenge string. We will use
the challenge string later, so let's save it in a property.
With the PublicKeyCredentialRequestOptions, we can use FIDO2 API getSignIntent to create an Intent to
open the fingerprint dialog.
Finally, we can pass the Intent back to the UI.
All Rights Reserved • FIDO Alliance • Copyright 2019 55
All Rights Reserved • FIDO Alliance • Copyright 2019 56
Open the fingerprint dialog for assertion
Open AuthFragment.kt and find TODO(5).
This is pretty much the same as what we did for registration. We can launch the fingerprint dialog with the
launchPendingIntent method.
All Rights Reserved • FIDO Alliance • Copyright 2019 57
Call the server API: /auth/signinResponse
Open AuthRepository.kt and find TODO(6).
First, we have to extract an AuthenticatorAssertionResponse from the method parameter data. You can use
AuthenticatorAssertionResponse.deserializeFromBytes to convert the byte array extra stored in data with
the key Fido.FIDO2_KEY_RESPONSE_EXTRA.
The response object has a credential ID in it as keyHandle. Just like we did in the registration flow, let's save this in a
local string variable so we can store it later.
We are now ready to call the server API with api.signinResponse. It will return two values, a list of credentials, and a
sign-in token.
At this point, the sign-in is successful. We have to store all the results in our SharedPreferences. The sign-in token
should be stored as a string with key PREF_TOKEN. The list of credentials should be stored as StringSet with the key
PREF_CREDENTIALS. The local credential ID we saved above should be stored as a string with key
PREF_LOCAL_CREDENTIAL_ID.
Finally, we have to let the UI know that the sign-in has succeeded so that the user is redirected to the home screen. This
can be done by calling invokeSignInStateListeners. Pass SignInState.SignedIn as an argument.
All Rights Reserved • FIDO Alliance • Copyright 2019 58
All Rights Reserved • FIDO Alliance • Copyright 2019 59
Run the app and click on "Reauth" to open AuthFragment. You should now see a fingerprint dialog prompting you to sign in with
your fingerprint.
Congrats! You have now learned how to use FIDO2 API on Android for registration and sign-in.
All Rights Reserved • FIDO Alliance • Copyright 2019
7. Congratulations!
60
You have successfully finished the codelab - Your first Android FIDO2 API.
What you've learned
• How to register a credential using a user verifying platform authenticator.
• How to authenticate a user using a registered authenticator.
• Available options for registering a new authenticator.
• UX best practices for reauth using a biometric sensor.
Next step
• Learn how to build similar experience in a website.
You can learn it by trying out the Your first WebAuthn codelab!
All Rights Reserved • FIDO Alliance • Copyright 2019 61
Resources
• WebAuthn specification
• Introduction to WebAuthn API
• FIDO WebAuthn Workshop
• WebAuthn Guide: DUOSEC
Special thanks to Yuriy Ackermann from FIDO Alliance for your help.

Mais conteúdo relacionado

Mais procurados

Implementing WebAuthn & FAPI supports on Keycloak
Implementing WebAuthn & FAPI supports on KeycloakImplementing WebAuthn & FAPI supports on Keycloak
Implementing WebAuthn & FAPI supports on KeycloakYuichi Nakamura
 
FIDO Workshop-Demo Breakdown.pptx
FIDO Workshop-Demo Breakdown.pptxFIDO Workshop-Demo Breakdown.pptx
FIDO Workshop-Demo Breakdown.pptxFIDO Alliance
 
2019 FIDO Tokyo Seminar - LINE PayへのFIDO2実装
2019 FIDO Tokyo Seminar - LINE PayへのFIDO2実装2019 FIDO Tokyo Seminar - LINE PayへのFIDO2実装
2019 FIDO Tokyo Seminar - LINE PayへのFIDO2実装FIDO Alliance
 
FIDO UAF Specifications: Overview & Tutorial
FIDO UAF Specifications: Overview & Tutorial FIDO UAF Specifications: Overview & Tutorial
FIDO UAF Specifications: Overview & Tutorial FIDO Alliance
 
WebAuthn - The End of the Password As We Know It?
WebAuthn - The End of the Password As We Know It?WebAuthn - The End of the Password As We Know It?
WebAuthn - The End of the Password As We Know It?Thomas Konrad
 
Microsoft's Implementation Roadmap for FIDO2
Microsoft's Implementation Roadmap for FIDO2Microsoft's Implementation Roadmap for FIDO2
Microsoft's Implementation Roadmap for FIDO2FIDO Alliance
 
U2F/FIDO2 implementation of YubiKey
U2F/FIDO2 implementation of YubiKeyU2F/FIDO2 implementation of YubiKey
U2F/FIDO2 implementation of YubiKeyHaniyama Wataru
 
OpenID 4 Verifiable Credentials + HAIP (Update)
OpenID 4 Verifiable Credentials + HAIP (Update)OpenID 4 Verifiable Credentials + HAIP (Update)
OpenID 4 Verifiable Credentials + HAIP (Update)Torsten Lodderstedt
 
Technical Considerations for Deploying FIDO Authentication
Technical Considerations for Deploying FIDO Authentication Technical Considerations for Deploying FIDO Authentication
Technical Considerations for Deploying FIDO Authentication FIDO Alliance
 
FIDO Alliance: Welcome and FIDO Update.pptx
FIDO Alliance: Welcome and FIDO Update.pptxFIDO Alliance: Welcome and FIDO Update.pptx
FIDO Alliance: Welcome and FIDO Update.pptxFIDO Alliance
 
OpenID for Verifiable Credentials
OpenID for Verifiable CredentialsOpenID for Verifiable Credentials
OpenID for Verifiable CredentialsTorsten Lodderstedt
 
Getting Started with FIDO2
Getting Started with FIDO2Getting Started with FIDO2
Getting Started with FIDO2FIDO Alliance
 
OAuth 2.0 and OpenID Connect
OAuth 2.0 and OpenID ConnectOAuth 2.0 and OpenID Connect
OAuth 2.0 and OpenID ConnectJacob Combs
 
OAuth 2.0 and OpenId Connect
OAuth 2.0 and OpenId ConnectOAuth 2.0 and OpenId Connect
OAuth 2.0 and OpenId ConnectSaran Doraiswamy
 
Introduction to OpenID Connect
Introduction to OpenID Connect Introduction to OpenID Connect
Introduction to OpenID Connect Nat Sakimura
 
Getting Started With WebAuthn
Getting Started With WebAuthnGetting Started With WebAuthn
Getting Started With WebAuthnFIDO Alliance
 
エンタープライズIT環境での OpenID Connect / SCIM の具体的実装方法 idit2014
エンタープライズIT環境での OpenID Connect / SCIM の具体的実装方法 idit2014エンタープライズIT環境での OpenID Connect / SCIM の具体的実装方法 idit2014
エンタープライズIT環境での OpenID Connect / SCIM の具体的実装方法 idit2014Takashi Yahata
 

Mais procurados (20)

Implementing WebAuthn & FAPI supports on Keycloak
Implementing WebAuthn & FAPI supports on KeycloakImplementing WebAuthn & FAPI supports on Keycloak
Implementing WebAuthn & FAPI supports on Keycloak
 
FIDO Workshop-Demo Breakdown.pptx
FIDO Workshop-Demo Breakdown.pptxFIDO Workshop-Demo Breakdown.pptx
FIDO Workshop-Demo Breakdown.pptx
 
2019 FIDO Tokyo Seminar - LINE PayへのFIDO2実装
2019 FIDO Tokyo Seminar - LINE PayへのFIDO2実装2019 FIDO Tokyo Seminar - LINE PayへのFIDO2実装
2019 FIDO Tokyo Seminar - LINE PayへのFIDO2実装
 
FIDO UAF Specifications: Overview & Tutorial
FIDO UAF Specifications: Overview & Tutorial FIDO UAF Specifications: Overview & Tutorial
FIDO UAF Specifications: Overview & Tutorial
 
WebAuthn - The End of the Password As We Know It?
WebAuthn - The End of the Password As We Know It?WebAuthn - The End of the Password As We Know It?
WebAuthn - The End of the Password As We Know It?
 
Microsoft's Implementation Roadmap for FIDO2
Microsoft's Implementation Roadmap for FIDO2Microsoft's Implementation Roadmap for FIDO2
Microsoft's Implementation Roadmap for FIDO2
 
U2F/FIDO2 implementation of YubiKey
U2F/FIDO2 implementation of YubiKeyU2F/FIDO2 implementation of YubiKey
U2F/FIDO2 implementation of YubiKey
 
WebAuthn
WebAuthnWebAuthn
WebAuthn
 
OpenID 4 Verifiable Credentials + HAIP (Update)
OpenID 4 Verifiable Credentials + HAIP (Update)OpenID 4 Verifiable Credentials + HAIP (Update)
OpenID 4 Verifiable Credentials + HAIP (Update)
 
Technical Considerations for Deploying FIDO Authentication
Technical Considerations for Deploying FIDO Authentication Technical Considerations for Deploying FIDO Authentication
Technical Considerations for Deploying FIDO Authentication
 
FIDO Alliance: Welcome and FIDO Update.pptx
FIDO Alliance: Welcome and FIDO Update.pptxFIDO Alliance: Welcome and FIDO Update.pptx
FIDO Alliance: Welcome and FIDO Update.pptx
 
OpenID for Verifiable Credentials
OpenID for Verifiable CredentialsOpenID for Verifiable Credentials
OpenID for Verifiable Credentials
 
Getting Started with FIDO2
Getting Started with FIDO2Getting Started with FIDO2
Getting Started with FIDO2
 
OAuth 2.0 and OpenID Connect
OAuth 2.0 and OpenID ConnectOAuth 2.0 and OpenID Connect
OAuth 2.0 and OpenID Connect
 
OAuth 2.0 and OpenId Connect
OAuth 2.0 and OpenId ConnectOAuth 2.0 and OpenId Connect
OAuth 2.0 and OpenId Connect
 
Introduction to OpenID Connect
Introduction to OpenID Connect Introduction to OpenID Connect
Introduction to OpenID Connect
 
FIDOのキホン
FIDOのキホンFIDOのキホン
FIDOのキホン
 
OpenID Connect Explained
OpenID Connect ExplainedOpenID Connect Explained
OpenID Connect Explained
 
Getting Started With WebAuthn
Getting Started With WebAuthnGetting Started With WebAuthn
Getting Started With WebAuthn
 
エンタープライズIT環境での OpenID Connect / SCIM の具体的実装方法 idit2014
エンタープライズIT環境での OpenID Connect / SCIM の具体的実装方法 idit2014エンタープライズIT環境での OpenID Connect / SCIM の具体的実装方法 idit2014
エンタープライズIT環境での OpenID Connect / SCIM の具体的実装方法 idit2014
 

Semelhante a Developer Tutorial: WebAuthn for Web & FIDO2 for Android

Securing a Web App with Security Keys
Securing a Web App with Security KeysSecuring a Web App with Security Keys
Securing a Web App with Security KeysFIDO Alliance
 
FIDO2 Specifications Overview
FIDO2 Specifications OverviewFIDO2 Specifications Overview
FIDO2 Specifications OverviewFIDO Alliance
 
FIDO2の概要と最新状況
FIDO2の概要と最新状況FIDO2の概要と最新状況
FIDO2の概要と最新状況FIDO Alliance
 
Complex architectures for authentication and authorization on AWS
Complex architectures for authentication and authorization on AWSComplex architectures for authentication and authorization on AWS
Complex architectures for authentication and authorization on AWSBoyan Dimitrov
 
Identity Management for Your Users and Apps: A Deep Dive on Amazon Cognito - ...
Identity Management for Your Users and Apps: A Deep Dive on Amazon Cognito - ...Identity Management for Your Users and Apps: A Deep Dive on Amazon Cognito - ...
Identity Management for Your Users and Apps: A Deep Dive on Amazon Cognito - ...Amazon Web Services
 
Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?Bitbar
 
DevConf.CZ 2020 @ Brno, Czech Republic : WebAuthn support for keycloak
DevConf.CZ 2020 @ Brno, Czech Republic : WebAuthn support for keycloakDevConf.CZ 2020 @ Brno, Czech Republic : WebAuthn support for keycloak
DevConf.CZ 2020 @ Brno, Czech Republic : WebAuthn support for keycloakHitachi, Ltd. OSS Solution Center.
 
OAuth for QuickBooks Online REST Services
OAuth for QuickBooks Online REST ServicesOAuth for QuickBooks Online REST Services
OAuth for QuickBooks Online REST ServicesIntuit Developer
 
Webinar: Extend The Power of The ForgeRock Identity Platform Through Scripting
Webinar: Extend The Power of The ForgeRock Identity Platform Through ScriptingWebinar: Extend The Power of The ForgeRock Identity Platform Through Scripting
Webinar: Extend The Power of The ForgeRock Identity Platform Through ScriptingForgeRock
 
New FIDO Specifications Overview -FIDO Alliance -Tokyo Seminar -Nadalin
New FIDO Specifications Overview -FIDO Alliance -Tokyo Seminar -NadalinNew FIDO Specifications Overview -FIDO Alliance -Tokyo Seminar -Nadalin
New FIDO Specifications Overview -FIDO Alliance -Tokyo Seminar -NadalinFIDO Alliance
 
Slide 1 - Authenticated Reseller SSL Certificate Authority
Slide 1 - Authenticated Reseller SSL Certificate AuthoritySlide 1 - Authenticated Reseller SSL Certificate Authority
Slide 1 - Authenticated Reseller SSL Certificate Authoritywebhostingguy
 
SoftLayer API 12032015
SoftLayer API  12032015SoftLayer API  12032015
SoftLayer API 12032015Nacho Daza
 
What API Specifications and Tools Help Engineers to Construct a High-Security...
What API Specifications and Tools Help Engineers to Construct a High-Security...What API Specifications and Tools Help Engineers to Construct a High-Security...
What API Specifications and Tools Help Engineers to Construct a High-Security...Hitachi, Ltd. OSS Solution Center.
 
RICOH THETA x IoT Developers Contest : Cloud API Seminar
 RICOH THETA x IoT Developers Contest : Cloud API Seminar RICOH THETA x IoT Developers Contest : Cloud API Seminar
RICOH THETA x IoT Developers Contest : Cloud API Seminarcontest-theta360
 
FIDO Technical Specifications Overview
FIDO Technical Specifications OverviewFIDO Technical Specifications Overview
FIDO Technical Specifications OverviewFIDO Alliance
 
A Detailed Guide to Securing React applications with Keycloak - WalkingTree ...
A Detailed Guide to Securing React applications with Keycloak  - WalkingTree ...A Detailed Guide to Securing React applications with Keycloak  - WalkingTree ...
A Detailed Guide to Securing React applications with Keycloak - WalkingTree ...Ganesh Kumar
 
apidays Paris 2022 - Securing APIs in Open Banking, Takashi Norimatsu, Hitachi
apidays Paris 2022 - Securing APIs in Open Banking, Takashi Norimatsu, Hitachiapidays Paris 2022 - Securing APIs in Open Banking, Takashi Norimatsu, Hitachi
apidays Paris 2022 - Securing APIs in Open Banking, Takashi Norimatsu, Hitachiapidays
 
Using API platform to build ticketing system (translations, time zones, ...) ...
Using API platform to build ticketing system (translations, time zones, ...) ...Using API platform to build ticketing system (translations, time zones, ...) ...
Using API platform to build ticketing system (translations, time zones, ...) ...Antonio Peric-Mazar
 
Live Identity Services Drilldown - PDC 2008
Live Identity Services Drilldown - PDC 2008Live Identity Services Drilldown - PDC 2008
Live Identity Services Drilldown - PDC 2008Jorgen Thelin
 

Semelhante a Developer Tutorial: WebAuthn for Web & FIDO2 for Android (20)

Securing a Web App with Security Keys
Securing a Web App with Security KeysSecuring a Web App with Security Keys
Securing a Web App with Security Keys
 
FIDO2 Specifications Overview
FIDO2 Specifications OverviewFIDO2 Specifications Overview
FIDO2 Specifications Overview
 
FIDO2 & Microsoft
FIDO2 & MicrosoftFIDO2 & Microsoft
FIDO2 & Microsoft
 
FIDO2の概要と最新状況
FIDO2の概要と最新状況FIDO2の概要と最新状況
FIDO2の概要と最新状況
 
Complex architectures for authentication and authorization on AWS
Complex architectures for authentication and authorization on AWSComplex architectures for authentication and authorization on AWS
Complex architectures for authentication and authorization on AWS
 
Identity Management for Your Users and Apps: A Deep Dive on Amazon Cognito - ...
Identity Management for Your Users and Apps: A Deep Dive on Amazon Cognito - ...Identity Management for Your Users and Apps: A Deep Dive on Amazon Cognito - ...
Identity Management for Your Users and Apps: A Deep Dive on Amazon Cognito - ...
 
Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?
 
DevConf.CZ 2020 @ Brno, Czech Republic : WebAuthn support for keycloak
DevConf.CZ 2020 @ Brno, Czech Republic : WebAuthn support for keycloakDevConf.CZ 2020 @ Brno, Czech Republic : WebAuthn support for keycloak
DevConf.CZ 2020 @ Brno, Czech Republic : WebAuthn support for keycloak
 
OAuth for QuickBooks Online REST Services
OAuth for QuickBooks Online REST ServicesOAuth for QuickBooks Online REST Services
OAuth for QuickBooks Online REST Services
 
Webinar: Extend The Power of The ForgeRock Identity Platform Through Scripting
Webinar: Extend The Power of The ForgeRock Identity Platform Through ScriptingWebinar: Extend The Power of The ForgeRock Identity Platform Through Scripting
Webinar: Extend The Power of The ForgeRock Identity Platform Through Scripting
 
New FIDO Specifications Overview -FIDO Alliance -Tokyo Seminar -Nadalin
New FIDO Specifications Overview -FIDO Alliance -Tokyo Seminar -NadalinNew FIDO Specifications Overview -FIDO Alliance -Tokyo Seminar -Nadalin
New FIDO Specifications Overview -FIDO Alliance -Tokyo Seminar -Nadalin
 
Slide 1 - Authenticated Reseller SSL Certificate Authority
Slide 1 - Authenticated Reseller SSL Certificate AuthoritySlide 1 - Authenticated Reseller SSL Certificate Authority
Slide 1 - Authenticated Reseller SSL Certificate Authority
 
SoftLayer API 12032015
SoftLayer API  12032015SoftLayer API  12032015
SoftLayer API 12032015
 
What API Specifications and Tools Help Engineers to Construct a High-Security...
What API Specifications and Tools Help Engineers to Construct a High-Security...What API Specifications and Tools Help Engineers to Construct a High-Security...
What API Specifications and Tools Help Engineers to Construct a High-Security...
 
RICOH THETA x IoT Developers Contest : Cloud API Seminar
 RICOH THETA x IoT Developers Contest : Cloud API Seminar RICOH THETA x IoT Developers Contest : Cloud API Seminar
RICOH THETA x IoT Developers Contest : Cloud API Seminar
 
FIDO Technical Specifications Overview
FIDO Technical Specifications OverviewFIDO Technical Specifications Overview
FIDO Technical Specifications Overview
 
A Detailed Guide to Securing React applications with Keycloak - WalkingTree ...
A Detailed Guide to Securing React applications with Keycloak  - WalkingTree ...A Detailed Guide to Securing React applications with Keycloak  - WalkingTree ...
A Detailed Guide to Securing React applications with Keycloak - WalkingTree ...
 
apidays Paris 2022 - Securing APIs in Open Banking, Takashi Norimatsu, Hitachi
apidays Paris 2022 - Securing APIs in Open Banking, Takashi Norimatsu, Hitachiapidays Paris 2022 - Securing APIs in Open Banking, Takashi Norimatsu, Hitachi
apidays Paris 2022 - Securing APIs in Open Banking, Takashi Norimatsu, Hitachi
 
Using API platform to build ticketing system (translations, time zones, ...) ...
Using API platform to build ticketing system (translations, time zones, ...) ...Using API platform to build ticketing system (translations, time zones, ...) ...
Using API platform to build ticketing system (translations, time zones, ...) ...
 
Live Identity Services Drilldown - PDC 2008
Live Identity Services Drilldown - PDC 2008Live Identity Services Drilldown - PDC 2008
Live Identity Services Drilldown - PDC 2008
 

Mais de FIDO Alliance

IBM: Hey FIDO, Meet Passkey!.pptx
IBM: Hey FIDO, Meet Passkey!.pptxIBM: Hey FIDO, Meet Passkey!.pptx
IBM: Hey FIDO, Meet Passkey!.pptxFIDO Alliance
 
OTIS: Our Journey to Passwordless.pptx
OTIS: Our Journey to Passwordless.pptxOTIS: Our Journey to Passwordless.pptx
OTIS: Our Journey to Passwordless.pptxFIDO Alliance
 
CISA: #MoreThanAPassword.pptx
CISA: #MoreThanAPassword.pptxCISA: #MoreThanAPassword.pptx
CISA: #MoreThanAPassword.pptxFIDO Alliance
 
Introducing FIDO Device Onboard (FDO)
Introducing  FIDO Device Onboard (FDO)Introducing  FIDO Device Onboard (FDO)
Introducing FIDO Device Onboard (FDO)FIDO Alliance
 
FIDO Alliance Webinar: Catch Up WIth FIDO
FIDO Alliance Webinar: Catch Up WIth FIDOFIDO Alliance Webinar: Catch Up WIth FIDO
FIDO Alliance Webinar: Catch Up WIth FIDOFIDO Alliance
 
Consumer Attitudes Toward Strong Authentication & LoginWithFIDO.com
Consumer Attitudes Toward Strong Authentication & LoginWithFIDO.comConsumer Attitudes Toward Strong Authentication & LoginWithFIDO.com
Consumer Attitudes Toward Strong Authentication & LoginWithFIDO.comFIDO Alliance
 
新しい認証技術FIDOの最新動向
新しい認証技術FIDOの最新動向新しい認証技術FIDOの最新動向
新しい認証技術FIDOの最新動向FIDO Alliance
 
日立PBI技術を用いた「デバイスフリーリモートワーク」構想
日立PBI技術を用いた「デバイスフリーリモートワーク」構想日立PBI技術を用いた「デバイスフリーリモートワーク」構想
日立PBI技術を用いた「デバイスフリーリモートワーク」構想FIDO Alliance
 
Introduction to FIDO and eIDAS Services
Introduction to FIDO and eIDAS ServicesIntroduction to FIDO and eIDAS Services
Introduction to FIDO and eIDAS ServicesFIDO Alliance
 
富士通の生体認証ソリューションと提案
富士通の生体認証ソリューションと提案富士通の生体認証ソリューションと提案
富士通の生体認証ソリューションと提案FIDO Alliance
 
テレワーク本格導入におけるID認証考察
テレワーク本格導入におけるID認証考察テレワーク本格導入におけるID認証考察
テレワーク本格導入におけるID認証考察FIDO Alliance
 
「開けゴマ!」からYubiKeyへ
「開けゴマ!」からYubiKeyへ「開けゴマ!」からYubiKeyへ
「開けゴマ!」からYubiKeyへFIDO Alliance
 
YubiOnが目指す未来
YubiOnが目指す未来YubiOnが目指す未来
YubiOnが目指す未来FIDO Alliance
 
FIDO2導入してみたを考えてみた
FIDO2導入してみたを考えてみたFIDO2導入してみたを考えてみた
FIDO2導入してみたを考えてみたFIDO Alliance
 
中小企業によるFIDO導入事例
中小企業によるFIDO導入事例中小企業によるFIDO導入事例
中小企業によるFIDO導入事例FIDO Alliance
 
VPNはもう卒業!FIDO2認証で次世代リモートアクセス
VPNはもう卒業!FIDO2認証で次世代リモートアクセスVPNはもう卒業!FIDO2認証で次世代リモートアクセス
VPNはもう卒業!FIDO2認証で次世代リモートアクセスFIDO Alliance
 
CloudGate UNOで安全便利なパスワードレスリモートワーク
CloudGate UNOで安全便利なパスワードレスリモートワークCloudGate UNOで安全便利なパスワードレスリモートワーク
CloudGate UNOで安全便利なパスワードレスリモートワークFIDO Alliance
 
数々の実績:迅速なFIDO認証の展開をサポート
数々の実績:迅速なFIDO認証の展開をサポート数々の実績:迅速なFIDO認証の展開をサポート
数々の実績:迅速なFIDO認証の展開をサポートFIDO Alliance
 
FIDO Alliance Research: Consumer Attitudes Towards Authentication
FIDO Alliance Research: Consumer Attitudes Towards AuthenticationFIDO Alliance Research: Consumer Attitudes Towards Authentication
FIDO Alliance Research: Consumer Attitudes Towards AuthenticationFIDO Alliance
 
Webinar: Securing IoT with FIDO Authentication
Webinar: Securing IoT with FIDO AuthenticationWebinar: Securing IoT with FIDO Authentication
Webinar: Securing IoT with FIDO AuthenticationFIDO Alliance
 

Mais de FIDO Alliance (20)

IBM: Hey FIDO, Meet Passkey!.pptx
IBM: Hey FIDO, Meet Passkey!.pptxIBM: Hey FIDO, Meet Passkey!.pptx
IBM: Hey FIDO, Meet Passkey!.pptx
 
OTIS: Our Journey to Passwordless.pptx
OTIS: Our Journey to Passwordless.pptxOTIS: Our Journey to Passwordless.pptx
OTIS: Our Journey to Passwordless.pptx
 
CISA: #MoreThanAPassword.pptx
CISA: #MoreThanAPassword.pptxCISA: #MoreThanAPassword.pptx
CISA: #MoreThanAPassword.pptx
 
Introducing FIDO Device Onboard (FDO)
Introducing  FIDO Device Onboard (FDO)Introducing  FIDO Device Onboard (FDO)
Introducing FIDO Device Onboard (FDO)
 
FIDO Alliance Webinar: Catch Up WIth FIDO
FIDO Alliance Webinar: Catch Up WIth FIDOFIDO Alliance Webinar: Catch Up WIth FIDO
FIDO Alliance Webinar: Catch Up WIth FIDO
 
Consumer Attitudes Toward Strong Authentication & LoginWithFIDO.com
Consumer Attitudes Toward Strong Authentication & LoginWithFIDO.comConsumer Attitudes Toward Strong Authentication & LoginWithFIDO.com
Consumer Attitudes Toward Strong Authentication & LoginWithFIDO.com
 
新しい認証技術FIDOの最新動向
新しい認証技術FIDOの最新動向新しい認証技術FIDOの最新動向
新しい認証技術FIDOの最新動向
 
日立PBI技術を用いた「デバイスフリーリモートワーク」構想
日立PBI技術を用いた「デバイスフリーリモートワーク」構想日立PBI技術を用いた「デバイスフリーリモートワーク」構想
日立PBI技術を用いた「デバイスフリーリモートワーク」構想
 
Introduction to FIDO and eIDAS Services
Introduction to FIDO and eIDAS ServicesIntroduction to FIDO and eIDAS Services
Introduction to FIDO and eIDAS Services
 
富士通の生体認証ソリューションと提案
富士通の生体認証ソリューションと提案富士通の生体認証ソリューションと提案
富士通の生体認証ソリューションと提案
 
テレワーク本格導入におけるID認証考察
テレワーク本格導入におけるID認証考察テレワーク本格導入におけるID認証考察
テレワーク本格導入におけるID認証考察
 
「開けゴマ!」からYubiKeyへ
「開けゴマ!」からYubiKeyへ「開けゴマ!」からYubiKeyへ
「開けゴマ!」からYubiKeyへ
 
YubiOnが目指す未来
YubiOnが目指す未来YubiOnが目指す未来
YubiOnが目指す未来
 
FIDO2導入してみたを考えてみた
FIDO2導入してみたを考えてみたFIDO2導入してみたを考えてみた
FIDO2導入してみたを考えてみた
 
中小企業によるFIDO導入事例
中小企業によるFIDO導入事例中小企業によるFIDO導入事例
中小企業によるFIDO導入事例
 
VPNはもう卒業!FIDO2認証で次世代リモートアクセス
VPNはもう卒業!FIDO2認証で次世代リモートアクセスVPNはもう卒業!FIDO2認証で次世代リモートアクセス
VPNはもう卒業!FIDO2認証で次世代リモートアクセス
 
CloudGate UNOで安全便利なパスワードレスリモートワーク
CloudGate UNOで安全便利なパスワードレスリモートワークCloudGate UNOで安全便利なパスワードレスリモートワーク
CloudGate UNOで安全便利なパスワードレスリモートワーク
 
数々の実績:迅速なFIDO認証の展開をサポート
数々の実績:迅速なFIDO認証の展開をサポート数々の実績:迅速なFIDO認証の展開をサポート
数々の実績:迅速なFIDO認証の展開をサポート
 
FIDO Alliance Research: Consumer Attitudes Towards Authentication
FIDO Alliance Research: Consumer Attitudes Towards AuthenticationFIDO Alliance Research: Consumer Attitudes Towards Authentication
FIDO Alliance Research: Consumer Attitudes Towards Authentication
 
Webinar: Securing IoT with FIDO Authentication
Webinar: Securing IoT with FIDO AuthenticationWebinar: Securing IoT with FIDO Authentication
Webinar: Securing IoT with FIDO Authentication
 

Último

₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...Diya Sharma
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableSeo
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebJames Anderson
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Servicesexy call girls service in goa
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...tanu pandey
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Delhi Call girls
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663Call Girls Mumbai
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceDelhi Call girls
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersDamian Radcliffe
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.soniya singh
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024APNIC
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Sheetaleventcompany
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Servicegwenoracqe6
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Standkumarajju5765
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 

Último (20)

Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
✂️ 👅 Independent Andheri Escorts With Room Vashi Call Girls 💃 9004004663
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 

Developer Tutorial: WebAuthn for Web & FIDO2 for Android

  • 1. Developer Tutorial: WebAuthn for Web & FIDO2 for Android Christiaan Brand, Product Manager: Identity & Security, Google 1 All Rights Reserved • FIDO Alliance • Copyright 2019
  • 2. All Rights Reserved • FIDO Alliance • Copyright 2019 2 codelabs.developers.google.com/codelabs/webauthn-reauth/ Codelab 1: Your First WebAuthn
  • 3. All Rights Reserved • FIDO Alliance • Copyright 2019 1. Introduction 3 What is WebAuthn? What is FIDO2? The FIDO2 / WebAuthn allows you to create and use strong, attested public key based credentials for the purpose of authenticating users. The API supports the use of BLE, NFC, and USB roaming authenticators (security keys) as well as a platform authenticator, which allows the user to authenticate using their fingerprint or screenlock. What you'll build... In this codelab, you are going to build a website with a simple re-authentication functionality using fingerprint sensor. Re-authentication is a concept where a user signs into a website once, then authenticate again as they try to enter important sections of the website, or come back after a certain interval, etc in order to protect the account. What you'll learn... You will learn how to call the WebAuthn API and options you can provide in order to cater various occasions. You will also learn re-auth specific best practices and tricks. Note: In this codelab, you won't learn how to build a FIDO server. What you'll need... • Hardware (one of following) • Android device with a fingerprint sensor (even without a fingerprint sensor, screenlock can provide equivalent user verification functionality) • Touch ID enabled MacBook Pro / Air • Windows 10 (Build 1903 or later) with Windows Hello • Browser • Google Chrome (Or any other browsers supporting WebAuthn)
  • 4. All Rights Reserved • FIDO Alliance • Copyright 2019 2. Getting Set Up 4 To work on this codelab, we'll be using a service called glitch. This is where you can edit both client and server side code using JavaScript and deploy them instantly. Head to the following URL: https://glitch.com/edit/#!/webauthn-codelab-start See how it works at the beginning Let's see the initial state of the website first. Click "Show" at the top and press "Next to The Code" to see the live website side by side. 1. Enter a username and submit (no registration is required, any username will create a new account) 2. Enter a password and submit (password will be ignored and user will be authenticated nevertheless) 3. User lands at home page. Clicking "Sign out" will sign you out. Clicking "Try reauth" sends you back to 2. What are we going to implement? 1. Let users register a "user verifying platform authenticator" (the Android phone with fingerprint sensor itself can act as one). 2. Let users re-authenticate themselves to the app using their fingerprint. You can preview what you are going to build from here. Remix the code In https://glitch.com/edit/#!/webauthn-codelab-start find "Remix to Edit" button at the top right corner. By pressing the button, you can "fork" the glitch and continue with your own version of the project with a new URL.
  • 5. All Rights Reserved • FIDO Alliance • Copyright 2019 3. Register a credential using a fingerprint 5 You first need to register a credential generated by a user verifying platform authenticator - an authenticator that is embedded onto the platform and verifies the user identity using biometrics or screenlock. We are adding this feature to the /home page.
  • 6. All Rights Reserved • FIDO Alliance • Copyright 2019 6 Create registerCredential()function Let's create a function called registerCredential() which registers a credential using a fingerprint.
  • 7. All Rights Reserved • FIDO Alliance • Copyright 2019 7 Feature detection Now, let's add WebAuthn code. First thing you should do is to detect whether WebAuthn is available. We can achieve this by examining if window.PublicKeyCredential exists. We'll throw an exception if the feature is not available. Is User Verifying Platform Authenticator available? Re-auth is most useful when the authenticator is a user verifying platform authenticator and that is what we will use. There's a handy function that can detect if there is a user verifying platform authenticator available called PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable(). If it's not available, throw an exception.
  • 8. All Rights Reserved • FIDO Alliance • Copyright 2019 8 Obtain the challenge and other option from server endpoint: /auth/registerRequest Before asking the user to provide a credential using fingerprint, ask the server to send back a challenge and other parameters. Call _fetch()with opts as an argument to send a POST request to the server.
  • 9. Here's an example options you will be receiving (aligns with PublicKeyCredentialCreationOptions). All Rights Reserved • FIDO Alliance • Copyright 2019 9 To learn about these options, see the official specification of the WebAuthn. Some important ones are explained at "Register a credential" section in the next page.
  • 10. All Rights Reserved • FIDO Alliance • Copyright 2019 10 Create a credential Because these options are delivered encoded in order to go through HTTP protocol, you have to convert some parameters back to binary - specifically, user.id, challenge and id s included in excludeCredentials array: And finally call the navigator.credentials.create() method in order to create a new credential. With this call, the browser will interact with the authenticator and tries to verify the user's identity using a fingerprint sensor or a screenlock.
  • 11. All Rights Reserved • FIDO Alliance • Copyright 2019 11 Once the user verifies their identity, you should be receiving a credential object you can send to the server and register the authenticator.
  • 12. All Rights Reserved • FIDO Alliance • Copyright 2019 12 Register the credential to the server endpoint: /auth/registerResponse Here’s an example credential object you should have received. Like when you received an option object for registering a credential, you should encode the binary parameters of the credential so that it can be delivered to the server as a string.
  • 13. All Rights Reserved • FIDO Alliance • Copyright 2019 13 Store the credential id locally so that we can use it for authentication when the user comes back. Finally, send the object to the server and if it returns HTTP code 200, consider the new credential has been successfully registered. Congratulations, you now have the complete registerCredential()function!
  • 14. All Rights Reserved • FIDO Alliance • Copyright 2019 4. Build the UI to register, get and remove credentials 14 It will be nice to have a list of registered credentials along with buttons to remove them. Build UI placeholder Let's add UI to list credentials and a button to register a new credential. ul#list will be the placeholder for adding a list of registered credentials
  • 15. All Rights Reserved • FIDO Alliance • Copyright 2019 15 Get a list of credentials and display: getCredentials() Let's create getCredentials()function so you can get registered credentials and display them in a list. Luckily, we already have a handy endpoint on the server /auth/getKeys which you can fetch registered credentials for the signed- in user. The returned JSON includes credential information such as id and publicKey. By building HTML you can show them to the user.
  • 16. All Rights Reserved • FIDO Alliance • Copyright 2019 16 Note: We are using a library called "lit-html" for handy template building. See lit-html project page to learn more, if you are interested. Let's display available credentials as soon as user lands on /home by invoking getCredentials().
  • 17. All Rights Reserved • FIDO Alliance • Copyright 2019 17 Remove the credential: removeCredential() In the list of credentials, you have added a button to remove each credential. By sending a request to /auth/removeKey along with credId query parameter, you can remove them.
  • 18. All Rights Reserved • FIDO Alliance • Copyright 2019 18 Register a credential Finally, call registerCredential()to register a new credential when (+) button is clicked. Don't forget to renew the credential list by calling getCredentials()after registration. Import registerCredential from client.js we created earlier:
  • 19. All Rights Reserved • FIDO Alliance • Copyright 2019 19 Following is important options to remember to pass in registerCredential()(PublicKeyCredentialCreationOptions we referred earlier).
  • 20. All Rights Reserved • FIDO Alliance • Copyright 2019 20 attestation Preference for attestation conveyance (none, indirect or direct). Choose none unless you need one. excludeCredentials Array of credential descriptors so that the authenticator can avoid creating duplicate ones. authenticatorSelection authenticatorAttachment Filter available authenticators. If you want an authenticator attached to the device, use "platform". For roaming authenticators, use "cross-platform". requireResidentKey Use true if the created credential should be available for future "account picker" UX. userVerification Determine whether authenticator local user verification is "required", "preferred" or "discouraged". If you want fingerprint or screenlock auth happen, use "required".
  • 21. All Rights Reserved • FIDO Alliance • Copyright 2019 5. Authenticate the user with a fingerprint 21 We now have a credential registered and ready to use it as a way to authenticate the user. Let's add re-auth functionality to the website. Here's the user experience: As soon as a user lands on /reauth, the website asks for re-auth using a fingerprint. When the user succeeds to authenticate, forward the user to /home, otherwise fallback to use the existing form to enter and submit a password.
  • 22. All Rights Reserved • FIDO Alliance • Copyright 2019 22 Create authenticate() function: Let's create a function called authenticate()which verifies user identity using a fingerprint. We'll be adding JavaScript code here. Feature detection and User Verifying Platform Authenticator check We can replicate the same behavior we did on registration.
  • 23. All Rights Reserved • FIDO Alliance • Copyright 2019 23 Obtain the challenge and other options from server endpoint: /auth/signinRequest Before authenticating, let's examine if the user has a stored credential id and set it as a query param if they do. By providing a credential id along with other options, the server can provide relevant allowCredentials and this will make user verification reliable.
  • 24. All Rights Reserved • FIDO Alliance • Copyright 2019 24 Before asking the user to authenticate, ask the server to send back a challenge and other parameters. Call _fetch()with opts as an argument to send a POST request to the server. Here's an example options you should be receiving (aligns with PublicKeyCredentialRequestOptions).
  • 25. All Rights Reserved • FIDO Alliance • Copyright 2019 25 Note: To learn about these options, see the official specification of the WebAuthn.
  • 26. All Rights Reserved • FIDO Alliance • Copyright 2019 26 Locally verify the user and get a credential Because these options are delivered encoded in order to go through HTTP protocol, you have to convert some parameters back to binary - specifically, challenge and ids included in allowCredentials array:
  • 27. All Rights Reserved • FIDO Alliance • Copyright 2019 27 Once the user verifies their identity, you should be receiving a credential object you can send to the server and authenticate the user.
  • 28. All Rights Reserved • FIDO Alliance • Copyright 2019 28 Verify the user identity: /auth/signinResponse Here's an example credential object you should have received. Again, encode the binary parameters of the credential so that it can be delivered to the server as a string.
  • 29. All Rights Reserved • FIDO Alliance • Copyright 2019 29
  • 30. All Rights Reserved • FIDO Alliance • Copyright 2019 30 Finally, send the object to the server and if it returns HTTP code 200, consider the user has been successfully signed-in. Congratulations, you now have the complete authencation()function! Don't forget to store the credential id locally so that we can use it for authentication when the user comes back.
  • 31. All Rights Reserved • FIDO Alliance • Copyright 2019 6. Enable reauth experience 31 To enable the reauth step, all you need is to run the authentication()as soon as user lands /reauth. Import authenticate from client.js we created earlier. Invoke authenticate()immediately.
  • 32. All Rights Reserved • FIDO Alliance • Copyright 2019 7. Congratulations! 32 You have successfully finished the codelab - Your first WebAuthn. What you’ve learned • How to register a credential using a user verifying platform authenticator. • How to authenticate a user using a registered authenticator. • Available options for registering a new authenticator. • UX best practices for reauth using a biometric sensor. Next step • Learn how to build similar experience in Android native app using FIDO2 API. • Learn how to associate a website and an Android app and share credentials between them using the Digital Asset Links. You can learn both by trying out the Your first Android FIDO2 API codelab!
  • 33. All Rights Reserved • FIDO Alliance • Copyright 2019 33 Resources • WebAuthn specification • Introduction to WebAuthn API • FIDO WebAuthn Workshop • WebAuthn Guide: DUOSEC Special thanks to Yuriy Ackermann from FIDO Alliance for your help.
  • 34. All Rights Reserved • FIDO Alliance • Copyright 2019 34 Codelab 2: Your First Android FIDO2 API https://codelabs.developers.google.com/codelabs/fido2-for-android/#0
  • 35. All Rights Reserved • FIDO Alliance • Copyright 2019 Introduction 35 What is the FIDO2 API? The FIDO2 API allows Android applications to create and use strong, attested public key-based credentials for the purpose of authenticating users. The API provides a WebAuthn Client implementation, which supports the use of BLE, NFC, and USB roaming authenticators (security keys) as well as a platform authenticator, which allows the user to authenticate using their fingerprint or screenlock. What you'll build... In this codelab, you are going to build an Android app with a simple re-authentication functionality using fingerprint sensor. "Re- authentication" is a concept where user signs into an app once, then authenticate again when they come back to your app, or trying to access an important section of your app. What you'll learn... You will learn how to call the Android FIDO2 API and options you can provide in order to cater various occasions. You will also learn re-auth specific best practices. Note: In this codelab, you won't learn how to build a FIDO server. What you'll need... Android device with a fingerprint sensor (even without a fingerprint sensor, screenlock can provide equivalent user verification functionality) Android OS 7.0 or later with latest updates. Make sure to register a fingerprint (or screenlock).
  • 36. All Rights Reserved • FIDO Alliance • Copyright 2019 2. Getting Setup 36 Clone the Repository Check out the GitHub repository. https://github.com/googlecodelabs/fido2-codelab What are we going to implement? • Let users register a "user verifying platform authenticator" (the Android phone with fingerprint sensor itself will act as one). • Let users re-authenticate themselves to the app using their fingerprint. You can preview what you are going to build from here. Start your codelab project The completed app sends requests to a server at https://webauthn-codelab.glitch.me. You may try web version of the same app there.
  • 37. All Rights Reserved • FIDO Alliance • Copyright 2019 37 You are going to work on your own version of the app. 1. Go to the edit page of the website at https://glitch.com/edit/#!/webauthn-codelab. 2. Find "Remix to Edit" button at the top right corner. By pressing the button, you can "fork" the code and continue with your own version along with a new project URL. 3. Copy the project name on top left (you may modify it as you want).
  • 38. All Rights Reserved • FIDO Alliance • Copyright 2019 38 4. Paste it to the .env file's HOSTNAME section in glitch.
  • 39. All Rights Reserved • FIDO Alliance • Copyright 2019 3. Associate your app and a website with the Digital Asset Links 39 To use FIDO2 API on an Android app, associate it with a website and share credentials between them. To do so, leverage the Digital Asset Links. You can declare associations by hosting a Digital Asset Links JSON file on your website, and adding a link to the Digital Asset Link file to your app's manifest. Host .well-known/assetlinks.json at your domain You can define an association between your app and the website by creating a JSON file and put it at .well- known/assetlinks.json. Luckily, we have a server code that displays assetlinks.json file automatically, just by adding following environment params to the .env file in glitch: • ANDROID_PACKAGENAME: Package name of your app (com.example.android.fido2) • ANDROID_SHA256HASH: SHA256 Hash of your signing certificate In order to get the SHA256 hash of your developer signing certificate, use the command below. The default password of the debug keystore is "android".
  • 40. All Rights Reserved • FIDO Alliance • Copyright 2019 40 By accessing https://<your-project-name>.glitch.me/.well-known/assetlinks.json, you should see a JSON string like this:
  • 41. All Rights Reserved • FIDO Alliance • Copyright 2019 41 Open the project in Android Studio Click "Open an existing Android Studio project" on the welcome screen of Android Studio. Choose the "android" folder inside the repository check out.
  • 42. All Rights Reserved • FIDO Alliance • Copyright 2019 42 Associate the app with your remix Open gradle.properties file. At the bottom of the file, change the host URL to the Glitch remix you just created. At this point, your Digital Asset Links configuration should be all set.
  • 43. All Rights Reserved • FIDO Alliance • Copyright 2019 4. See how the app works now 43 Let's start by checking out how the app works now. Make sure to select "app-start" in the run configuration combobox. Click "Run" (the green triangular next to the combobox) to launch the app on your connected Android device. When you launch the app you'll see the screen to type your username. This is UsernameFragment. For the purpose of demonstration, the app and the server accept any username. Just type something and press "Next".
  • 44. All Rights Reserved • FIDO Alliance • Copyright 2019 44 The next screen you see is AuthFragment. This is where the user can sign in with a password. We will later add a feature to sign in with FIDO2 here. Again, for the purpose of demonstration the app and the server accept any password. Just type something and press "Sign In".
  • 45. All Rights Reserved • FIDO Alliance • Copyright 2019 45 This is the last screen of this app, HomeFragment. For now, you only see an empty list of credentials here. Pressing "Reauth" takes you back to AuthFragment. Pressing "Sign Out" takes you back to UsernameFragment. The floating action button with "+" sign doesn't do anything now, but it will initiate registration of a new credential once you have implemented the FIDO2 registration flow.
  • 46. All Rights Reserved • FIDO Alliance • Copyright 2019 46 Before starting to code, here's a useful technique. On Android Studio, press "TODO" at the bottom. It will show a list of all the TODOs in this codelab. We'll start with the first TODO in the next section.
  • 47. All Rights Reserved • FIDO Alliance • Copyright 2019 5. Register a credential using a fingerprint 47 In order to enable authentication using a fingerprint, you'll first need to register a credential generated by a user verifying platform authenticator - a device-embedded authenticator that verifies the user using biometrics, such as a fingerprint sensor. As we have seen in the previous section, the floating action button doesn't do anything now. Let's see how we can register a new credential.
  • 48. All Rights Reserved • FIDO Alliance • Copyright 2019 48 Call the server API: /auth/registerRequest Open AuthRepository.kt and find TODO(1). Here, registerRequest is the method that is called when the FAB is pressed. We'd like to make this method call the server API /auth/registerRequest. The API returns all the PublicKeyCredentialCreationOptions that the client needs to generate a new credential. It also returns a challenge as a string. We need this for a subsequent API call of /auth/registerResponse, so let's save this in a local property. We can then call getRegisterIntent with said options. This FIDO2 API returns an Android Intent to open a fingerprint dialog and generate a new credential. Now we have the Intent, all we have to do is to pass it back to our UI so it can proceed to show the fingerprint dialog. The method returns a MutableLiveData. We can simply post the Intent as the LiveData’s value.
  • 49. All Rights Reserved • FIDO Alliance • Copyright 2019 49 The method will then look like something below.
  • 50. All Rights Reserved • FIDO Alliance • Copyright 2019 50 Open the fingerprint dialog for registration Open HomeFragment.kt and find TODO(2). This is where the UI gets the Intent back from our AuthRepository. The returned object has a convenient method called launchPendingIntent. Calling it will open a dialog for credential generation.
  • 51. All Rights Reserved • FIDO Alliance • Copyright 2019 51 Call the server API: /auth/registerResponse Open AuthRepository.kt and find TODO(3). This registerReponse method is called after the UI successfully generated a new credential. The parameter data has all the information about this new credential. We want to send it back to the server. First, we have to extract an AuthenticatorAttestationResponse from the data. The data Intent has an extra field of byte array with the key Fido.FIDO2_KEY_RESPONSE_EXTRA. You can use a static method in AuthenticatorAttestationResponse called deserializeFromBytes to turn the byte array into an AuthenticatorAttestationResponse object. The AuthenticatorAttestationResponse object has information about the newly generated credential inside. We now want to remember the ID of our local key so we can distinguish it from other keys registered on the server. In the AuthenticatorAttestationResponse object, take its keyHandle property and save it in a local string variable as using toBase64. Now we are ready to send the information to the server. Use api.registerReponse to call the server API and send the token, the challenge string and the response. The returned value is a list of all the credentials registered on the server, including the new one. Finally, we can save the results in our SharedPreferences. The list of credentials should be saved with the key PREF_CREDENTIALS as a StringSet. You can use toStringSet to convert the list of credentials into a StringSet. In addition, we save the credential ID with the key PREF_LOCAL_CREDENTIAL_ID.
  • 52. All Rights Reserved • FIDO Alliance • Copyright 2019 52
  • 53. All Rights Reserved • FIDO Alliance • Copyright 2019 53 Run the app, and you will be able to click on the FAB and register a new credential.
  • 54. All Rights Reserved • FIDO Alliance • Copyright 2019 6. Authenticate the user with a fingerprint 54 We now have a credential registered on the app and the server. We can now use it to let the user sign in. We are adding fingerprint sign-in feature to AuthFragment. When a user lands on it, it shows a fingerprint dialog. When the authentication succeeds, the user to redirected to HomeFragment. Call the server API: /auth/signinRequest Open AuthRepository.kt and find TODO(4). This signinRequest method is called when AuthFragment is opened. Here, we want to request the server and see if we can let the user sign in with FIDO2. First, we have to retrieve PublicKeyCredentialRequestOptions from the server. Use api.signInRequest to call the server API. It returns two values, PublicKeyCredentialRequestOptions and a challenge string. We will use the challenge string later, so let's save it in a property. With the PublicKeyCredentialRequestOptions, we can use FIDO2 API getSignIntent to create an Intent to open the fingerprint dialog. Finally, we can pass the Intent back to the UI.
  • 55. All Rights Reserved • FIDO Alliance • Copyright 2019 55
  • 56. All Rights Reserved • FIDO Alliance • Copyright 2019 56 Open the fingerprint dialog for assertion Open AuthFragment.kt and find TODO(5). This is pretty much the same as what we did for registration. We can launch the fingerprint dialog with the launchPendingIntent method.
  • 57. All Rights Reserved • FIDO Alliance • Copyright 2019 57 Call the server API: /auth/signinResponse Open AuthRepository.kt and find TODO(6). First, we have to extract an AuthenticatorAssertionResponse from the method parameter data. You can use AuthenticatorAssertionResponse.deserializeFromBytes to convert the byte array extra stored in data with the key Fido.FIDO2_KEY_RESPONSE_EXTRA. The response object has a credential ID in it as keyHandle. Just like we did in the registration flow, let's save this in a local string variable so we can store it later. We are now ready to call the server API with api.signinResponse. It will return two values, a list of credentials, and a sign-in token. At this point, the sign-in is successful. We have to store all the results in our SharedPreferences. The sign-in token should be stored as a string with key PREF_TOKEN. The list of credentials should be stored as StringSet with the key PREF_CREDENTIALS. The local credential ID we saved above should be stored as a string with key PREF_LOCAL_CREDENTIAL_ID. Finally, we have to let the UI know that the sign-in has succeeded so that the user is redirected to the home screen. This can be done by calling invokeSignInStateListeners. Pass SignInState.SignedIn as an argument.
  • 58. All Rights Reserved • FIDO Alliance • Copyright 2019 58
  • 59. All Rights Reserved • FIDO Alliance • Copyright 2019 59 Run the app and click on "Reauth" to open AuthFragment. You should now see a fingerprint dialog prompting you to sign in with your fingerprint. Congrats! You have now learned how to use FIDO2 API on Android for registration and sign-in.
  • 60. All Rights Reserved • FIDO Alliance • Copyright 2019 7. Congratulations! 60 You have successfully finished the codelab - Your first Android FIDO2 API. What you've learned • How to register a credential using a user verifying platform authenticator. • How to authenticate a user using a registered authenticator. • Available options for registering a new authenticator. • UX best practices for reauth using a biometric sensor. Next step • Learn how to build similar experience in a website. You can learn it by trying out the Your first WebAuthn codelab!
  • 61. All Rights Reserved • FIDO Alliance • Copyright 2019 61 Resources • WebAuthn specification • Introduction to WebAuthn API • FIDO WebAuthn Workshop • WebAuthn Guide: DUOSEC Special thanks to Yuriy Ackermann from FIDO Alliance for your help.