GitHub API: using ‘repo’ scope, but still can’t see private repos

From testing: GETing /users/someusername/repos doesn’t show private repos (even if it’s the user whose oauth access token you’re using). GETing /user/repos show private repos. This isn’t documented in the GitHub API docs at present, I just found out via testing. Thanks to @ivanzuzak for suggesting to look at the endpoint.

Should clients get OAuth 2 access tokens using GET or POST?

The most common argument is that you should not put sensitive information in a query string (GET parameter) as Web servers typically log the HTTP request URL. POST data can be arbitrarily long, so is not usually logged. Therefore when you’re dealing with something like client_secret or code (although it’s one time use), it makes … Read more

Best practices for SessionId/Authentication Token generation

UUID generation is random, but random with bad entropy means that you will end up with easy to guess UUIDs. If you use a good random number generator, you can generate UUIDs that can be used for sessions. The catch to this, however, is that UUIDs don’t have built-in re-play prevention, tampering, fixation, etc., you … Read more

In what ways is an SSH Key different from tokens for git authentication?

From the blog post you linked, I can see at least one benefit of tokens over SSH keys: while tokens and SSH keys both share the Unique, Revocable, and Random benefits quoted in the blog post below, tokens are also Limited in comparison to SSH keys in that they come with their own scoped permissions … Read more

How can I keep my Heroku application private?

My cheap solution has been implementing a before_filter to request an HTTP authentication before every action is executed. This solution works well along other authentication layers – Devise or others. USERS = { “user” => “secret” } before_filter :authenticate def authenticate authenticate_or_request_with_http_digest(“Application”) do |name| USERS[name] end end Whenever other peers land at yourdomain.heroku.com, they are … Read more

How to use Windows Active Directory Authentication and Identity Based Claims?

Just hit AD with the username and password instead of authenticating against your DB // POST: /Account/Login [HttpPost] [AllowAnonymous] [ValidateAntiForgeryToken] public async Task<ActionResult> Login(LoginViewModel model, string returnUrl) { if (ModelState.IsValid) { var user = await UserManager.FindByNameAsync(model.UserName); if (user != null && AuthenticateAD(model.UserName, model.Password)) { await SignInAsync(user, model.RememberMe); return RedirectToLocal(returnUrl); } else { ModelState.AddModelError(“”, “Invalid username … Read more

Docker: What is the simplest way to secure a private registry?

I’m still learning how to run and use Docker, consider this an idea: # Run the registry on the server, allow only localhost connection docker run -p 127.0.0.1:5000:5000 registry # On the client, setup ssh tunneling ssh -N -L 5000:localhost:5000 user@server The registry is then accessible at localhost:5000, authentication is done through ssh that you … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)