How to create a user with readonly privileges for all databases in Postgresql?

You need to do 2 things: firstly, allow access to existing objects; and secondly, set the default access for new objects created from now on. Note that granting access to “TABLES” includes views, but does not include sequences (such as the auto-increment function for “SERIAL” columns), so you’ll probably want to grant access to those … Read more

bower install self_signed_cert_in_chain

It finally worked for me. These are the steps I took: Uninstall bower from npm npm uninstall bower or npm uninstall -g bower Install bower-canary from npm npm install bower-canary or npm install -g bower-canary Create .bowerrc in your project directory with the following content to turn off SSL: { “strict-ssl”: false, “https-proxy”: “” } … Read more

Capabilities for Lua: what experience is there?

I can’t speak to Lua but for Javascript, Caja has tooling to create a proper sandbox, limiting access to only certain functions. It was originally created to build a sandbox for HTML/JS widgets (like those used on iGoogle). http://code.google.com/p/google-caja/ Here’s a description of the project from their homepage: Caja (pronounced “KA-ha”), is a Spanish word … Read more

How does Maven 3 password encryption work?

My answer is based on reading the Maven source code and doing a little research. Does the encrypted master password provide security simply by existing in settings-security.xml in a folder that only one user can access (~/.m2)? If so, why bother with encrypting a ‘master password’ (why not just use some random value)? Isn’t the … Read more

What is happening when I have two CSP (Content Security Policies) policies – header & meta?

If you have CSP directives specified both in a Content-Security-Policy HTTP header and in a meta element, the browser uses the most-restrictive CSP directives, wherever specified. See the details on multiple polices at https://w3c.github.io/webappsec-csp/#multiple-policies and details on using the meta element at https://w3c.github.io/webappsec-csp/#meta-element: A policy specified via a meta element will be enforced along with … Read more

Using AspNetUserTokens table to store refresh token in ASP.NET Core Web Api

I’ll answer your question directly then propose an alternative. You can Remove, Set, Get, and Validate tokens with the AspNetUserTokens table. However, you can probably skip the db and I’ll describe that below. The following methods of the UserManager will generate and store: await _userManager.RemoveAuthenticationTokenAsync(user, “MyApp”, “RefreshToken”); var newRefreshToken = await _userManager.GenerateUserTokenAsync(user, “MyApp”, “RefreshToken”); await … Read more

Signed session cookies. A good idea?

A signed token is a good method for anything where you want to issue a token and then, when it is returned, be able to verify that you issued the token, without having to store any data on the server side. This is good for features like: time-limited-account-login; password-resetting; anti-XSRF forms; time-limited-form-submission (anti-spam). It’s not … Read more

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