authorization

How to handle sensitive properties in a RESTful API (such as passwords, credit cards, etc)

僤鯓⒐⒋嵵緔 提交于 2019-12-04 14:17:19
Working on a REST framework that will support multiple hypermedia types and authentication. One thing I'm not really sure how to handle are sensitive values in the resources. For instance, if I were to include user management in the API, I would need a way to expose to the client that there was a field for the password, but not show the actual password hash. Same thing with a credit card. If I don't, it would violate the hypermedia constraint as knowledge of the fields would become out of band, and make my HATEOAS broken. Here's an actual use case that I've encountered: The project is a

Why does the TeamCity command line runner execute under “System”?

岁酱吖の 提交于 2019-12-04 14:06:59
I've got a bit of an auth problem with with TeamCity when running a command line build. It's related to an existing question about executing an svn checkout command but I want to ask it explicitly here: Why is it that when the TeamCity build agent service is configured to run under a specific Active Directory account and not the local system account, when I execute this command: echo "%username%" I get this build output: [20:52:04]: C:\TeamCity\buildAgent\work\b67560ceb299718c>echo "SYSTEM" [20:52:04]: "SYSTEM" This is really playing havoc with my attempts to execute commands under the

So very very confused about Authentication in asp.net mvc

廉价感情. 提交于 2019-12-04 14:05:02
问题 I come to the conclusion I need to ditch the ASP.NET Membership (for list of reasons). Now really the only thing I see that I need is creating a cookie(done by Form Authentication ), custom methods for authentication (done) and finally validation based on if they are logged in or by role. I am stuck on the last one. I am trying to override the Authorize (attribute) but I have no clue how to do this. I looked at many examples and each one seems to be done differently then the next. I don't

Asp.Net deny access on certain pages to users

雨燕双飞 提交于 2019-12-04 13:52:09
问题 How do I allow access to my web application to a user, but deny them access to a specific page? I want to allow more uses to use an app I've built, but there are a couple pages I don't want them to be able to access. Here's what I have in the Web.config now. <authorization> <allow roles="COMPANY\User_1"/> <allow roles="COMPANY\User_2"/> <allow roles="COMPANY\User_3"/> <deny users="*"/> </authorization> ==================================================================================== Here's

Custom Authorization (Permissions) ASP.NET MVC

旧街凉风 提交于 2019-12-04 13:06:13
In my application a role has several permissions. And I want users to have access to actions dependent on permission, not the role. So suppose: Admin has perm1, perm2, perm3, SuperAdmin has all the permissons that admin has + perm4 and perm5. Also, there are some minor guys also who have perm1, perm3, perm6, perm7. I want to do the following: I want action to be accessible by guy who has suppose perm3 or perm4. those two permissions are from two different roles. but beside perm3 Admin has perm1 and perm2, this action will be also accessible by minor guys who have perm3 (its not obligatory to

Does SVN allows blanks in paths for svn auth file rules?

Deadly 提交于 2019-12-04 13:03:38
We currently have problems with directories that contain blanks and are part of rules in the svn auth file. So we want to have path based authorization, and have a file that contains the following: [/] * = rw [/junk of me] * = me = rw When I clear the authentication data and checkout the root of my repository as me , I see the root directory and the sub-directory junk of me . When I add a file inside of junk of me , and try it to commit as another user, I am allowed to do that. It looks like the rule for junk of me does not work at all. I have tried the following variations, but had no

Centralized Authentication and Authorization for several Web Services

半腔热情 提交于 2019-12-04 12:04:06
问题 There are several different web services -- various technologies used, such as Java, .NET, Python, Perl, and possibly more in the future -- belonging to different organizations, and the access to those web services has to be restricted. The idea is to have a central authentication and authorization server, only responsible for granting access to each WS. I'm looking for a Single Sign On system in which the user authenticates once with the auth server and is granted access to the web services

location path used with MVC app doesn't work

天涯浪子 提交于 2019-12-04 11:54:04
问题 I want to use the location path , allow user and deny user to restrict access in my MVC app. This is the section that I added to the web.config <location path="Views/Admin/Ticketing/Seasons.aspx"> <system.web> <authorization> <allow users="admin" /> <deny users="user1" /> </authorization> </system.web> </location> It is not working. non-admin users, like user1 can still view the page. I am not sure if it is because I have the routing set up differently or wrong. This is the URL of the tab I

How can I limit asp.net control actions based on user role?

℡╲_俬逩灬. 提交于 2019-12-04 11:52:44
I have several pages or views in my application which are essentially the same for both authenticated users and anonymous users. I'd like to limit the insert/update/delete actions in formviews and gridviews to authenticated users only, and allow read access for both authed and anon users. I'm using the asp.net configuration system for handling authentication and roles. This system limits access based on path so I've been creating duplicate pages for authed and anon paths. The solution that comes to mind immediately is to check roles in the appropriate event handlers, limiting what possible

Restricting users from accessing pages by directly changing the URL in JSF

蹲街弑〆低调 提交于 2019-12-04 11:32:48
问题 I have two kinds of users in my application - clients and sellers. I am using a PhaseListener in JSF to prevent users from accessing pages without logging in, but after they are logged in I dont know how to prevent the user from change the URL in the location bar and accessing pages that he is not allowed too. E.g, preventing clients from accessing sellers pages. Does anyone have an idea on how I could prevent such illegal accesses? 回答1: Assign the user a group/role and check on that as well