REST API Authentication
Also: API authenticationAPI keyAPI keysbearer tokenbearer authenticationbasic authenticationOAuthOAuth 2.0access tokenHTTP Basic AuthenticationBearer Token Authenticationoauth 2
REST APIs authenticate clients with methods such as basic authentication (Base64-encoded username and password, which must be protected by HTTPS), API keys, bearer tokens and OAuth 2.0, which grants limited-scope access tokens without sharing the user's password.
NetworkChuck0
Not taught as a topic in NetworkChuck Free CCNA. Mentioned fewer than twice, if at all.
Jeremy's IT Lab2
- Day 61 Part 2 REST API Authentication
REST API AuthenticationValidates a client's identity before an API grants access to an application's data; it is also used to track usage for billing. Common methods are basic, bearer, API key and OAuth 2.0. An API key is a static key from the provider that is valid until revoked and should be sent in the Authorization header.
7:24Let's look a bit deeper at basic authentication as I said basic Authentication includes a username and password in the HTTP headers these credentials are encoded in base 64 format.
Said 62× - Day 61 REST APIs
REST API AuthenticationIn the DNA Center demo, a POST with Basic Auth credentials returns a token. Later requests include it in the X-Auth-Token header, because the stateless API needs authentication on every request.
Covered on a concept card
Related terms
Flashcards that test it
Jeremy's IT LabHow does HTTP basic authentication send credentials, and are they encrypted?
It sends 'username:password' Base64-encoded in the Authorization header of every request. Base64 is encoding, not encryption, so it is easily decoded and needs HTTPS.
Jeremy's IT LabWhat is the Authorization header format for bearer authentication?
Authorization: Bearer <token>
Jeremy's IT LabIn bearer authentication, where does the client get its token?
From an authorization (auth) server, which is usually separate from the resource server that hosts the resource.
Jeremy's IT LabWhat does 'bearer' mean in bearer authentication, and how is the risk reduced?
Anyone who possesses the token can use it. The risk is reduced by making tokens expire after a set period.
Jeremy's IT LabAPI key vs bearer token: which one expires automatically?
The bearer token. An API key is static and stays valid until it is revoked, so keys must be rotated manually.
Jeremy's IT LabWhere should an API key be sent, and why not in the URL?
In the HTTP Authorization header. URLs are often logged by web servers, proxies and browsers, so a key in the URL can leak.
Jeremy's IT LabWhy are API keys commonly used by cloud services and third-party APIs?
Each customer gets a unique key, so the provider can easily track usage, e.g. for billing. Keys are also easier to implement than bearer tokens.
Jeremy's IT LabWhat is the main purpose of OAuth 2.0, and how does it improve security?
Access delegation: it gives third-party apps limited access to a user's resources without exposing the user's credentials to that app.