authorization

Application authorization in a trusted third party WIF environment

萝らか妹 提交于 2019-12-10 11:11:45
问题 All, I'm a little confused over some of the concepts behind Windows Intentity Foundation and the overall architectural fit in a third-party "trusted" environment as regards Authorisation. I think I may have missed something but I can't see how it would work in the real world. As an example, we have a number of systems behind a portal. Customers can access the portal and, based on their permissions they can access features of each different application. In the current scenario, we may have a

How can I develop a custom AuthorizeAttribute that accepts a login OR a token?

匆匆过客 提交于 2019-12-10 10:56:21
问题 In my MVC 5 application, I decorate my controllers as follows: [Authorize] public class Controller { .. However, one requirement I have is to use a token to authorize an action without going to the login screen. ie: http://{website}/Action?token={/* token for this user */} Thus, how can I develop a custom AuthorizeAttribute that accepts a login (default behavior) OR a token (custom, required behavior)? In other words, if I use http://{website}/Action , I would be redirected to the login

Is it possible to compare attributes in a XACML policy?

青春壹個敷衍的年華 提交于 2019-12-10 09:57:21
问题 The following rule says subjects with role "acme_manager" can perform any action on the resource "/acme/widgets": <Rule Effect="Permit" RuleId="PermitRule"> <Condition> <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and"> <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-is-in"> <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">/acme/widgets</AttributeValue> <AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" Category=

How to enable user log in from the only one machine(by acquiring CPU Serial) to the ASP.NET-MVC web application

对着背影说爱祢 提交于 2019-12-10 05:31:55
问题 Scenario: I have web deployed ASP.NET-MVC 5 application with individual user accounts: Identity 2.x. Every user has an e-mail and password to log in the web application via browser, this means that user can log via any device with internet browser. I would like to enable user logging on condition that he uses exactly the same PC class machine every time he logs in. I can politely ask user to run any desktop .NET(.exe) application if necessary. I can also ask user to use Chrome browser if the

Role-based access control with Spring MVC

北战南征 提交于 2019-12-10 04:15:05
问题 I would like to know the best practices for the role based access control with spring. My requirements are, I will have set of roles assigned to users say, user1=admin, user2=expert user1 will have the accesses write like /admin/member-management /admin/project-management ...... for user2.... /myproject1/* so if user2 tries to access the url /admin/member-management will be redirect to authorization failure page. 回答1: The standard framework to use with Spring MVC is Spring Security. While it

RESTful Service Authentication

☆樱花仙子☆ 提交于 2019-12-10 04:04:37
问题 As per REST spec, the service is supposed to be stateless; but then it becomes difficult to enable authentication. Some of the stuff I have read said "making REST stateful is not end of the world". But that's not the point, the point is to follow the spec and be consistent. So, I am asking this question here in a hope someone could guide me in the right direction. I am working with Spring MVC to create a REST Service. I do not have views. It is a true REST Service which consumes/produces JSON

OAuth 2.0 authentication in HTTP Module

删除回忆录丶 提交于 2019-12-10 03:49:07
问题 Is it possible to implement OAuth(Open Authorization) 2.0 or 1.0 in HTTP Module. Why i m choosing this because, each and every request will first reaches the HTTP Module, so from that request i have to authenticate Is it possible ? If YES means , please like a related link for that Help me.. 回答1: Yes, this is possible. In fact mod_auth_openidc does exactly that for Apache (and for OpenId Connect, which is a protocol built on OAuth2). More on the scenario here: https://auth0.com/blog/2014/08

Google Drive Android API returns success even after removing the app

时光毁灭记忆、已成空白 提交于 2019-12-10 03:05:44
问题 I'm using the new Google Drive Android API. This is the demo code that I've copied from Google's android-samples repo. GoogleSignInAccount signInAccount = GoogleSignIn.getLastSignedInAccount(this); if (signInAccount != null && signInAccount.getGrantedScopes().containsAll(requiredScopes)) { initializeDriveClient(signInAccount); } else { ... } The issue I'm facing is, even if I remove the app from Drive, getLastSignedInAccount() is still returning the account and the operations (such as adding

Authorization header not making it through in Codeception API testing

会有一股神秘感。 提交于 2019-12-10 02:54:34
问题 I am attempting to test my Laravel 4 REST API using Codeception, but when I try to send through my Authorization header (using the $I->amBearerAuthenticated() function of the REST module) it is not making it through to the eventual request. From what I can see, the Symfony2 BrowserKit module modifies any headers added into the HTTP_XXX_XXX format, so the header being sent seems to be HTTP_AUTHORIZATION - when I output the received headers in my application, however, neither Authorization nor

Rails Dynamic Role-Based Authorization plugin?

早过忘川 提交于 2019-12-09 22:32:08
问题 There are a lot of role-based authorization plugins out there. They work great when you know in advance what the roles are going to be. For example, if I know I'm going to have administrators, super_users, and not_so_super_users. What I really want is to be able to create custom roles and assign that role to a user. At this point, I am simply wanting to block access to controllers / actions based on a user's custom role. Roles will consist of permissions. For example, Jane Doe can add and