Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oauth 2.0: client id and client secret exposed, is it a security issue?

When an Android oauth 2.0 client application has its credentials (client ID and client Secret) hard-coded is very easy to decompile the application and retrieve the credentials.
What are the consequences in exposing the client ID and Secret?

like image 870
Luander Avatar asked Jan 28 '13 13:01

Luander


People also ask

Is client ID and secret secure?

API Key and Secret Key The Client ID is a public identifier of your application. The Client Secret is confidential and should only be used to authenticate your application and make requests to LinkedIn's APIs.

What is OAuth2 authentication vulnerabilities?

Perhaps the most infamous OAuth-based vulnerability is when the configuration of the OAuth service itself enables attackers to steal authorization codes or access tokens associated with other users' accounts. By stealing a valid code or token, the attacker may be able to access the victim's data.

Is OAuth client secret sensitive?

The answer to your question is NO because the access token represents the authorization result itself and is intended to the pass through the application, the authorization server, and resource server while the client secret should be a secret known only to the application and the authorization server.


1 Answers

I know this won't be a good StackOverflow answer, but I don't feel able to explain it better than the Threat Model and Security Considerations (RFC 6819). So here is the paragraph about obtaining a Client Secret and its relative consequences.

Note that an Android app is a Public Client (a Native Application to be more specific) so, as you say, unable to keep confidential its credentials, but still able to protect Tokens and Authorization Code.

Also interesting for your case is an example about smartphones.

I know that RFCs aren't the most funny reading, but those are pretty clear.

like image 100
Enrico Avatar answered Sep 23 '22 19:09

Enrico