authorization

On Asp.net Web Api authorization filters, how can I access to parameters?

余生颓废 提交于 2019-12-03 00:44:09
I'am starting with Asp.Net Web API and here's my problem : I implement a custom authorization filter to inspect my message header looking for an API Key. Based on this API Key, I retrieve my user and then I would like to see if he can have access to some resources. The resources ID I want to check is on the parameters of the HTTP request. But when I'am on the AuthorizationFilter method, the actions parameters list is empty. How can I do that ? If I used an ActionFilter in replacement of an authorization filter, how can I be sure that this will be the first filter executed ? And globally, how

MongoDB “root” user

这一生的挚爱 提交于 2019-12-03 00:35:36
问题 Is there a super UNIX like "root" user for MongoDB? I've been looking at http://docs.mongodb.org/manual/reference/user-privileges/ and have tried many combinations, but they all seem to lack in an area or another. Surely there is a role that is above all the ones listed there. 回答1: While out of the box, MongoDb has no authentication, you can create the equivalent of a root/superuser by using the "any" roles to a specific user to the admin database. Something like this: use admin db.addUser( {

Group/rule-based authorization approach in node.js and express.js

孤人 提交于 2019-12-03 00:34:07
问题 What are good strategies for role-based authorization in express.js? Especially with express-resource? With Express-resource there are no handlers, so I think there are three options: Use a middleware Pass the authorization function to the resource and check each resource request separately Check authorization with every request right after authentication Are there any other solutions? Group/Role-based authorization is a pretty antique approach. Are there newer methods of access control? If

Looking for a license key algorithm [closed]

拥有回忆 提交于 2019-12-03 00:14:18
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . There are a lot of questions relating to license keys asked on Stack Overflow. But they don't answer this question. Can anyone provide a simple license key algorithm that is technology independent and doesn't required a diploma in mathematics to understand? The license key

Authorization approaches and design patterns for Node.js applications [closed]

 ̄綄美尐妖づ 提交于 2019-12-03 00:02:57
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . I am building a multiple page admin interface for an internal enterprise software platform. Think lots of glue logic tying together various APIs, db queries, and shell scripts. We will be using node.js, the express framework (including jade templates), and LDAP for authentication. I

Resource level authorization in RESTful service

让人想犯罪 __ 提交于 2019-12-02 23:34:27
Let /users/{id} be a resource url in RESTful service. Basic authentication is enabled and only authenticated users are allowed to access the url. Example Scenario: User_1 & User_2 are authenticated users with userId 1 & 2. Since both are authenticated, both of them are having access to, /users/1 /users/2 But the expectation is User_1 should have access to /users/1 and not to /users/2 or other userId. Question: How to do resource level authorization in RESTful services? Note: I am implementing RESTful using Jax-RS (with Apache CXF implementation), helpful if you could explain with Jax-RS.

ASP.NET MVC 3 Authentication/Authorization [closed]

烈酒焚心 提交于 2019-12-02 23:22:32
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. I am very new to ASP.NET MVC 3 (and MVC in general for that matter). In ASP.NET Web Forms, I did authentication using Principals and Identities. Is this the recommended way to do it in MVC or is there something newer? I see a Membership class, but if I understand it correctly it is too heavyweight for what I need. Does any one have a good tutorial or site recommendation to help me out with this? It can be comprehensive

How do you let only authorized user have access contents stored in Amazon's S3?

你。 提交于 2019-12-02 22:30:50
Once you stored contents in S3 and make it public, then everyone have access to it. Is there a way to let only authorized users have access to the content stored in S3? For example, I have a site that let people store their documents. The server stores these documents in S3 and I would like only the user who uploaded the document to have access to it. I know I can copy the S3 contents to my server and let only authorized users have access, but this will make the server slow. I would like to be able server the contents directly to the client's browser from the S3. Thanks. The link given in the

web site configuration

假装没事ソ 提交于 2019-12-02 22:13:34
One web site is required to be accessed by me (developer) and one user (DOMAIN_NAME\USER_NAME). When I developed web site in visual studio using "automatic host" created by VS, the following settings in web.config were enough: <authentication mode="Windows"/> <authorization> <allow users="DOMAIN_NAME\my_name,DOMAIN_NAME\USER_NAME" /> <deny users="*" /> </authorization> But when I created web site in IIS I'm receiving error: Access is denied. Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested

How do I get the current Url from within a FilterAttribute?

ⅰ亾dé卋堺 提交于 2019-12-02 21:41:48
I am writing an Authorize filter attribute adn I'm having trouble figuring out how to get the current url as a string so I can pass it as a parameter to the LogOn action. The goal is that if a user successfully logs on, they will be redirected to the page they were originally trying to access. public override void OnAuthorization(AuthorizeContext filterContext) { base.OnAuthorization(filterContext); ... my auth code ... bool isAuth ; ... my auth code ... if(!isAuth) { filterContext.Result = new RedirectToRouteResult( new RouteValueDictionary { { "Area", "" }, { "Controller", "Account" }, {