Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Design and Architecture
  4. Securing oAuth Client Id and Secret

Securing oAuth Client Id and Secret

Scheduled Pinned Locked Moved Design and Architecture
helpsecurityjsonquestion
2 Posts 2 Posters 7 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kevin Marois
    wrote on last edited by
    #1

    I have a desktop app that consumes a Google API. Right now the Client Id and Secret are defined as constant strings in plain text and built into the app.I'd like to secure them with encryption, but then I would have to store the key somewhere, which doesn't solve the problem. What's the best way to secure the Id and Secret? Thanks

    If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

    J 1 Reply Last reply
    0
    • K Kevin Marois

      I have a desktop app that consumes a Google API. Right now the Client Id and Secret are defined as constant strings in plain text and built into the app.I'd like to secure them with encryption, but then I would have to store the key somewhere, which doesn't solve the problem. What's the best way to secure the Id and Secret? Thanks

      If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.

      J Offline
      J Offline
      jschell
      wrote on last edited by
      #2

      There is no absolute solution. Anywhere you get it from the code when running must still have it in memory which could be copied. Some possible variations. 1. Encrypt text in your code. But then of course the encryption key must be somewhere. But it does make it a bit harder to find the more useful (hackable) first one 2. Load it from a file. Installing into production means that the authorized users are only ones with access to the file. They put the value in the file. This can be combined with the first one so that the value in the file is still encrypted. In that case you do want the encryption key in the code and not the file. Because then they would need to figure out both to get to the uncrypted value.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups