authorization

How to hide some feature based on the user login? [closed]

ε祈祈猫儿з 提交于 2019-12-19 04:12:10
问题 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 2 years ago . We would like to hide some code features based on user login in Tomcat. We are using the basic authentications. Any suggestions? 回答1: IF what you meant was just hiding some resources depending on whether the user is logged in or not then it is just a matter of restricting access

Conceptual overview of WCF security model?

自作多情 提交于 2019-12-19 04:09:43
问题 I'm working with WCF at the moment and attempting to implement a custom security model based around an API key and signature (similar to how Facebook/Flickr/OAuth etc. work). There are a while bunch of classes like ServiceAuthorizationManager, SecurityToken, SecurityTokenValidator, IAuthorizationPolicy and so on, but I can't seem to find any documentation about how these work together or what the conceptual security model is for WCF. I'm really looking for something that details how these

WCF UserName Authentication: Can I get the Username in a custom ServiceAuthorizationManager?

只谈情不闲聊 提交于 2019-12-19 03:45:07
问题 I have a WCF service that is using a custom ServiceAuthorizationManager . The custom auth manager is already set up to handle Windows and Forms authentication. However, if I connect with a client that is set to UserName auth, I can't seem to find the username anywhere. The client code looks like this: this.ClientCredentials.UserName.UserName = "user"; this.ClientCredentials.UserName.Password = "pass"; this.Open(); this.MyMethod(); // my actual contract method this.Close(); Then on the server,

WCF UserName Authentication: Can I get the Username in a custom ServiceAuthorizationManager?

帅比萌擦擦* 提交于 2019-12-19 03:45:07
问题 I have a WCF service that is using a custom ServiceAuthorizationManager . The custom auth manager is already set up to handle Windows and Forms authentication. However, if I connect with a client that is set to UserName auth, I can't seem to find the username anywhere. The client code looks like this: this.ClientCredentials.UserName.UserName = "user"; this.ClientCredentials.UserName.Password = "pass"; this.Open(); this.MyMethod(); // my actual contract method this.Close(); Then on the server,

ADFS as OAuth2 provider / Authentication server possible?

不打扰是莪最后的温柔 提交于 2019-12-19 03:36:25
问题 We want to setup ADFS 3.0 to enable OAuth2 based authentication. I have read lots of documentation, but am still unclear if this is supported. Can ADFS be used as an authorization server for oauth, or is oauth2 support in ADFS only meant to work as a client to another authorization server? Any help for setting up adfs as oauth provider/server is appreciated. 回答1: in ADFS 2012R2 (aka ADFS 3.0), we only support the authorization grant flow. The only scenario is for public clients (say a mobile

How to set up git server WITHOUT ssh auth

大兔子大兔子 提交于 2019-12-19 03:13:38
问题 Some time ago I stumbled upon an explanation on how to set up git authentication via the web server somehow. That way no ssh key swapping would be needed on client side. Shame on me, I did neither bookmark its link nor can remember the technique. I just miss throwing out a username:password combo to give access to some throwaway repositories. When prototyping some VM setups it was the last time I felt this need, snapshots were not an ideal solution. Is it possible to use git just with

dynamically mapping roles to controllers in ASP.Net MVC

不问归期 提交于 2019-12-18 17:07:15
问题 I am currently hard coding the authorized roles in the filter in my MVC applications like so: [Authorize(Roles = "Administrator,Manager")] I'd like to eventually have a way to map the roles to each controller, so that the site admin can handle assigning what roles can perform each set of actions. string roles = DoSomethingToGetAllowableRoles(controllerName); [Authorize(Roles = roles)] I'm imagining that I need to have a database table that somehow keeps a listing of each controller, and then

Google App Engine authorization for Google BigQuery

旧时模样 提交于 2019-12-18 17:02:43
问题 I have followed the instructions in https://developers.google.com/bigquery/authorization#service-accounts-appengine to make some queries from app engine to bigquery. In the step 2, I click on Team in Google Api Console and it redirects to App Engine > Administration > Permissions. I add the service account name as Email and as a role I select developer (the option "can edit" is not available), and then click "Invite user". After that, appears a message: "An email was sent to xxxxxx@appspot

JWT authentication in SignalR (.NET Core) without passing token in Query String

北慕城南 提交于 2019-12-18 14:18:10
问题 I am using JWT authentication tokens in an ASP .NET Core Web API application. The tokens are generated by the API itself, not by a third party. I added SignalR sucessfully to the stack, but now I need to authenticate the users that are trying to execute server (Hub) methods. Someone suggested to pass the token in the "qs" property in JavaScript. This will not work for me as our tokens are really large (they contain lots of claims). I tried writing a custom middleware for reading the token

Override the User.IsInRole and [Authorize(Roles = “Admin”)] for MVC4 application

旧城冷巷雨未停 提交于 2019-12-18 13:54:12
问题 I have created a custom role provider for my MVC4 application where I have been successfully able to override CreateRole, GetAllRoles and RoleExists methods and link them to my existing database as follows: namespace Project.Providers { public class MyProvider : System.Web.Security.SqlRoleProvider { private MyContext dbcontext = new MyContext(System.Configuration.ConfigurationManager.ConnectionStrings["MyContext"].ConnectionString); private Repository<MyUser> userRepository; private