authorization

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

一世执手 提交于 2019-12-04 08:09:21
问题 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

WCF, WebAPI and OWIN IIS integrated pipeline. Skip OWIN based on route

我是研究僧i 提交于 2019-12-04 07:35:06
Situation I have a Silverlight application that uses a WCF backend. Going forward we have moved to JS clients with WebAPI. I have a couple of WebAPI controllers that I would like to use from the Silverlight client and so have them loaded within the ASP.Net application that hosts the WCF services. This works fine from a "all services are available" point of view, however Authorization is being invoked multiple times for WCF calls; from OWIN and through WCF ServiceAuthorizationManager On the WCF side, my ServiceAuthorizationManager implementation validates the token in the AuthHeader and then

Pyramid and FormAlchemy admin interface

◇◆丶佛笑我妖孽 提交于 2019-12-04 07:34:52
I have a pyramid project using the formalchemy admin interface. I added the basic ACL authentication and the pyramid_formalchemy plugin always denys even though I am authenticated. Any thoughts on how only allow authenticated users to use the pyramid_formalchemy admin interface? The authorization policy was add like this: authn_policy = AuthTktAuthenticationPolicy('MYhiddenSECRET', callback=groupfinder) authz_policy = ACLAuthorizationPolicy() config = Configurator( settings=settings, root_factory='package.auth.RootFactory', authentication_policy=authn_policy, authorization_policy=authz_policy

OAuth v2 communication between authentication and resource server

倖福魔咒の 提交于 2019-12-04 07:23:10
问题 I'm having some troubles understanding how OAUTH-v2 works. The OAuth version 2 spec reads: Accessing Protected Resources The client accesses protected resources by presenting the access token to the resource server. The resource server MUST validate the access token and ensure it has not expired and that its scope covers the requested resource. The methods used by the resource server to validate the access token (as well as any error responses) are beyond the scope of this specification , but

Gmail Api return Unauthorized client or scope in request

我与影子孤独终老i 提交于 2019-12-04 06:13:23
问题 I have struggled to make this work but did half the job. Actually I can only read messages from Gmail API, If I try to use the gmail.modify Scope I get an error: HttpAccessTokenRefreshError: unauthorized_client: Unauthorized client or scope in request. Here is my code: # init gmail api credentials_path = os.path.join(settings.PROJECT_DIR, 'settings/gmail_credential.json') scopes = ['https://www.googleapis.com/auth/gmail.readonly', 'https://www.googleapis.com/auth/gmail.modify'] credentials =

Can CLIENT-CERT auth-method be used with a JDBC realm within tomcat?

那年仲夏 提交于 2019-12-04 05:37:53
The JDBC realm specifies a table structure for authentication which contains the columns defined by the attributes userNameCol and userCredCol. These correspond to user and password which makes sense for FORM or BASIC auth-methods. They are interactive and require these two pieces from the client's user. What comes back from the certificate? What would an example of the data stored in userNameCol and userCredCol look like? Is there an alternative table structure for the realm in this case? PS - I'm using tomcat 5.5.x. JDBCRealm Supports CLIENT-CERT Yes, it can. However, there are few quirks to

How to change Spring Security roles by context?

倾然丶 夕夏残阳落幕 提交于 2019-12-04 05:30:17
I want to know if its possible to set roles based on a selected category. In our app there are categories which contain articles. Now we have a role hierarchy like this: ROLE_ADMIN > ROLE_EDITOR > ROLE_USER . The problem is that a user might have different roles based on the currently selected category: user1 - cat1 - ROLE_USER user1 - cat2 - ROLE_EDITOR The categories are not static. New ones can be added and older deleted. Is it possible to achieve this using Spring Security? From your description, it sounds like the RBAC model that Spring Security gives you is not enough. You have 2 options

Dynamic user based authorization in Pyramid

妖精的绣舞 提交于 2019-12-04 05:24:50
I'm following security guidelines found on Pyramid docs along with wiki tutorial Adding Authorization Now I need to add restrictions based un single user rather than groups. Let's say for example that, if any blog editor can have permission to review all comments, only post author can edit the post itself . For the first task I will have in my Root ACL like this: __acl__ = [ (Allow, Everyone, 'view'), (Allow, Authenticated, 'view_profile'), (Allow, 'groups:editor', 'edit_comment') ] but whay about for edit_post ? I've read this answer but seems overkill to me for my needs since I don't need to

Passing authorization header for oauth token request

假如想象 提交于 2019-12-04 05:23:38
I using java to implement oauth for obtaining an unauthorized request token. How do I pass the parameters in the authorization header? I need to pass : GET /request_token HTTP/1.1 Host: photos.example.net:80 Authorization: OAuth realm="http://photos.example.net/request_token", oauth_consumer_key="dpf43f3p2l4k3l03", oauth_nonce="kllo9940pd9333jh", oauth_timestamp="1191242096", oauth_signature_method="HMAC-SHA1", oauth_version="1.0", oauth_signature="tR3%2BTy81lMeYAr%2FFid0kMTYa%2FWM%3D" How do I go about that? For those looking for an example of how to pass the OAuth2 authorization (access

Cryptopia API in Google Sheets (Google Apps Script)

自作多情 提交于 2019-12-04 05:09:35
问题 In continuation of building Google SpreadSheet using Google Apps Script I've done with getting my Bittrex and Poloniex balances, but can't get to work with Cryptopia. Here is a link to my struggles with Bittrex Map JSON objects array to strings Here is an official API links: https://www.cryptopia.co.nz/Forum/Thread/256 Here are some examples: https://www.cryptopia.co.nz/Forum/Thread/262 https://github.com/Coac/cryptopia.js/blob/master/index.js https://github.com/sigwo/node-cryptopia/blob