authorization

Which authentication and authorization schemes are you using - and why?

好久不见. 提交于 2019-11-29 19:58:30
We're beginning to design a whole bunch of new services to create (WCF, ADO.NET Data Services, possibly in the cloud at some point) and one question that pops up is what authentication and authorization scheme to use - there are quite a few! We basically need to be able to identify users (actual people, and "virtual" application/service users) on a wide variety of protocols - HTTP, HTTPS, TCP - and we need to assign them at least a bunch of roles / permission to see certain data and/or do certain operations. We definitely can't use Windows group membership alone - we have plenty of external

Customize the Authorization HTTP header

╄→尐↘猪︶ㄣ 提交于 2019-11-29 19:41:43
I need to authenticate a client when he sends a request to an API. The client has an API-token and I was thinking about using the standard Authorization header to send the token to the server. Normally this header is used for Basic and Digest authentication. But I don't know if I'm allowed to customize the value of this header and use a custom auth-scheme, e.g: Authorization: Token 1af538baa9045a84c0e889f672baf83ff24 Would you recommend this or not? Or is there an better approach to sending the token? You can create your own custom auth schemas that use the Authorization: header - for example,

Using Claim-Based Authorization

半城伤御伤魂 提交于 2019-11-29 19:37:28
The new ASP.NET 4.5 code has "re-parented" the ASP.NET RoleProvider to a ClaimsProvider. What I'm trying to figure out, is what would a "claims based" example of authorization look like (preferably in MVC4)? How does my Authorize attribute interact, or not, with this capability? The WebSecurity and Roles API havn't changed; there is no "DoesUserHaveClaim()" signature. Similarly, it is not clear how the Authorize attribute interacts with claims. Was this "claims authorization" feature intended primarily for OAuth? If so, how are claims forwarded to my application? A cookie? Or was this claims

ASP.NET MVC Custom Authorization

梦想的初衷 提交于 2019-11-29 19:34:39
I have a question about custom authorization in MVC. I have a site that I want to limit access to certain pages, depending on their group membership. Now I have seen tons of examples on how to do this if there is a single admin group and a single user group, for example, but not any examples for a third level. For example, only users of a company can view orders for their own company (and each company has its own admins, etc). These companies are stored in a DB. So I have seen ways to do custom authorization, overriding the AuthorizeCore method on the AuthorizeAttribute , but I don't know how

net/http.rb:560:in `initialize': getaddrinfo: Name or service not known (SocketError)

点点圈 提交于 2019-11-29 18:42:33
问题 @@timestamp = nil def generate_oauth_url @@timestamp = timestamp url = CONNECT_URL + REQUEST_TOKEN_PATH + "&oauth_callback=#{OAUTH_CALLBACK}&oauth_consumer_key=#{OAUTH_CONSUMER_KEY}&oauth_nonce=#{NONCE} &oauth_signature_method=#{OAUTH_SIGNATURE_METHOD}&oauth_timestamp=#{@@timestamp}&oauth_version=#{OAUTH_VERSION}" puts url url end def sign(url) Base64.encode64(HMAC::SHA1.digest((NONCE + url), OAUTH_CONSUMER_SECRET)).strip end def get_request_token url = generate_oauth_url signed_url = sign

Best practice to organize authorization in microservice architecture?

淺唱寂寞╮ 提交于 2019-11-29 18:03:12
问题 For example, I have 3 services: Authentication Seller Buyer Each of them got their own databases, models, services... etc Authentication service knows about users, user-groups, roles, permissions and creates token. Where should I store sellers/buyers entities? On Authentication service, or on Seller/Buyer services? How should Seller/Buyer services interact to create new seller/buyer entity? How should Seller/Buyer services check permissions? Seller and Buyer entities have some common fields:

How to restrict unlogged/unauthorized users from viewing web pages in ASP.NET

谁说我不能喝 提交于 2019-11-29 17:24:53
I have some created web forms and I need to check whether the user is authenticated or not, before displaying the other web forms. All the users can access Default.aspx and About.aspx pages. And I have three types of users namely- Admin,User and Super User . Also, I keep the authentication details in my own SQL server db. How can I do this? Thanks in advance! First establish membership and role provider. There is whole story about it. I will give a help here. Here is link to SqlMembershipProvider (one of the options you can take): http://msdn.microsoft.com/en-us/library/system.web.security

Authorize current user against controller and action name in ASP.NET MVC 3

偶尔善良 提交于 2019-11-29 17:10:46
问题 I need to create a customized authorization in ASP.NET MVC 3. Inside the app, authorization is defined in 5 tables: users, groups, usergroups, rights, grouprights. A user can belong to several groups, and each right can be assigned to several groups too. Each controller action is assigned a RightID. The built in authorization can't accomodate this setup, so I tried to create a customized AuthorizeAttribute. When overriding AuthorizeCore, I realized I don't have access to controller name and

Angular5 WebApi token authorization not working

烂漫一生 提交于 2019-11-29 16:33:13
I'm trying to implement token authorization for Angular5 client and WebApi server application. I have managed to create WebApi part of the project in question and when I try to get the token via "POSTMAN" I get a good response: Postman request and server answer I'm trying to achieve the same with Angular5. This is my call from angular: login(user: string, pass: string) { let params = new HttpParams() .append('grant_type', 'password') .append('username', user) .append('password', pass); let headers = new HttpHeaders() .set('Content-Type', 'application/x-www-form-urlencoded'); return this._http

Issue with custom Authorization in DropWizard

让人想犯罪 __ 提交于 2019-11-29 16:32:48
I am trying to add custom authorization in dropwizard but not able to successed. I have a custom authentication added for dropwizard by binding it to authFactory Authenticator ssoAuthenticator = createSSOAuthenticator(configuration.getSsoGrantClientConfiguration()); environment.jersey().register(AuthFactory.binder( new SSOTokenAuthFactory<SSOGrant>( ssoAuthenticator, SYSTEM_PREFIX, SSOGrant.class)) ); and adding a dynamicfeature for authorization environment.jersey().register(PermissionDynamicFeature.class); Below is the annotation created @Documented @Retention(java.lang.annotation