application-security

How secure is Oauth 2.0 Implicit Grant?

荒凉一梦 提交于 2019-12-17 22:54:27
问题 In Implicit Grant, the access token is sent back in the callback URL. Is this not a security risk because, if this callback URL is cached in the hop. In general it is advised, not to send sensitive data in URL params, and this access token will be a token to access all secured user resources. So why is it getting passed as fragment in URL 回答1: Elaborating on @vlatko's response... To mitigate the risk of sending the token in the fragment (or via any other OAuth2 grant): ensure that the OAuth

Certificate Pinning on .NET

你说的曾经没有我的故事 提交于 2019-12-12 10:51:39
问题 I want to limit my .NET application to accept only known certificates. So how can I enforce certificate pinning on .NET? What is the best practice? Is it OK to just validate thumb print? 回答1: Per OWASP, you can implement certificate and public key pinning using .NET's ServicePointManager class 回答2: https://www.owasp.org/index.php/Certificate_and_Public_Key_Pinning#.Net This URL already has a good example. // Encoded RSAPublicKey private static String PUB_KEY =

Using Secure String and Keeping it Secure [duplicate]

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-02 19:48:41
This question already has an answer here: When would I need a SecureString in .NET? 11 answers So the .NET framework provides the SecureString class for storing strings in a secure fashion. But to read the information and work with it you have to return it to a standard string. See this implementation example . As you can see from the example using the pointer we return an unencrypted string. How to do we now manage that "insecure" instance of the string? What is the most secure way to work with the value once it has been set? Edit The purpose of this question was to discuss methods to REDUCE

How secure is Oauth 2.0 Implicit Grant?

隐身守侯 提交于 2019-11-28 20:51:03
In Implicit Grant, the access token is sent back in the callback URL. Is this not a security risk because, if this callback URL is cached in the hop. In general it is advised, not to send sensitive data in URL params, and this access token will be a token to access all secured user resources. So why is it getting passed as fragment in URL Elaborating on @vlatko's response... To mitigate the risk of sending the token in the fragment (or via any other OAuth2 grant): ensure that the OAuth endpoint and the callback endpoint are TLS (https) (See countermeasures ) send a state parameter to prevent