authorization

Sample web application in java with security constraints in web.xml

流过昼夜 提交于 2019-12-13 04:06:45
问题 I am looking for sample web application in JAVA which has security-constraints in its web.xml file to handle authentication and authorization. Basically I want to see how web security is implemented with security constraints. I goggled about it and mostly could find example of web.xml file which shows how can one provide web security with security constraints. but I would like to have may be small but complete web application in java which exhibits this concept. Could someone please suggest

Using a single policy method to cover every action on a resource

纵然是瞬间 提交于 2019-12-13 03:42:24
问题 I have a resource named Post . Every Post is related to a single User , and a User may have several (or zero) Posts . I'm using Route::resource to map routes for every possible action on the Post resource to a single resource controller, PostController . Now, I wish to implement a policy for the Post resource. Aiming to keep everything as simple and fool-proof as possible, I'd like to make the policy as follows: Every user is authorized to make any action that doesn't require an existing Post

Need some advice on my own Role Based Access Control (RBAC)

泪湿孤枕 提交于 2019-12-13 02:37:28
问题 I have a pretty simple profile page where users can upload images and videos. I have implemented my own role system and I'm not using .NET (I wanted to learn and builded my own). I'll have 10´000 users at the most and about 50-100 users simultaneously using it. I have three tables in the DB that handles my RBAC: Roles : Admin, User, Manager, Guest Permissions : SendEmail, AdvancedSearch, RemoveUser ... etc. Authorized : In this table I map a role to a permission. I run a check every time a

Slack Oauth/Authorize API Call

血红的双手。 提交于 2019-12-13 01:54:23
问题 I'm new to OAuth (and the Slack API) and have a question regarding Step 1 of Slack's OAuth Flow. It says "Your web or mobile app should redirect users to the following url: https://slack.com/oauth/authorize". At first I thought I should do an XHR request but then came to understand that that is not what I want. After more research, I found that the initial oauth/authorize request should be sent as a direct request in the browser. My problem is I can't begin to visualize how this should be

XACML how to efficiently control Access to Collections (Lists) of Resources

允我心安 提交于 2019-12-13 01:04:02
问题 Let's say I have a collection transactions and a policy that grants read access to a transaction within that collection for users with the role user , if the user's department is the same as the on of the record. The Problem: If I access single resources I have no problem checking access per resource. But if I want to enumerate/ list the whole collection I would need to check each and every item in the collection which is not efficient (especially if you amount of entries is "high"). It would

Authorization settings for a folder in ASP.NET

流过昼夜 提交于 2019-12-13 00:28:15
问题 I have an asp.net web site, I want restrict all users to access a folder named "log" and I have this element in web.config: <location path="log"> <system.web> <authorization> <deny users="*"/> </authorization> </system.web> </location> and this element before it in system.web: <authorization> <allow users="*"/> </authorization> but still I have access to this url: http://www.mydomain.com/log/log.txt Any ideas? Thanks. 回答1: .txt files are not handled by ASP.NET by default. You'll have to block

AuthzForce XACML Response is Indeterminate

心不动则不痛 提交于 2019-12-13 00:17:18
问题 I am exploring Authzforce XACML3.0 and I have been running into issues. I keep getting my responses as indeterminate. Below is my setup and the Exception trace which it throws. Any help is appreciated. Request File: <?xml version="1.0" encoding="utf-8"?> <Request ReturnPolicyIdList="false" CombinedDecision="false" xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Attributes Category="urn:oasis:names:tc:xacml:1.0:subject-category

Yandex Maps return 403 Forbidden using retrofit

风格不统一 提交于 2019-12-12 19:14:36
问题 When I call this link https://geocode-maps.yandex.ru/1.x/?format=json&geocode=astana on my browser it works, but when I call it using retrofit It gives me 403 Forbidden My code is Retrofit retrofit = new Retrofit.Builder() .baseUrl(Settings.YANDEX_URL) .addConverterFactory(GsonConverterFactory.create()) .client(client) .build(); return retrofit.create(YandexService.class); public final static String YANDEX_URL = "https://geocode-maps.yandex.ru/1.x"; I call it using this @GET("/") Call

Do Apache NiFi's InvokeHTTP and other HTTP processors send an Authorization header to redirected URLs?

我的未来我决定 提交于 2019-12-12 18:43:09
问题 If I have configured a property Authorization with a bearer token, will InvokeHTTP send that header to the redirected URL? I can't find anything in the documentation about it. I also can't seem to find clarity in the source of OkHttp, the underlying library for InvokeHTTP. Is there a way to strip a header from a redirected URL based on the URL? I may quickly be getting into "use ExecuteGroovyScript" territory here. 回答1: The short answer is no, because OkHttp strips Authorization on redirects:

Error during loading of SSIS package

人走茶凉 提交于 2019-12-12 14:28:02
问题 I'm trying to execute a SSIS package on a SQL Server 2008R2. The script retrieve data on a remote server and copy them to its local database. This job is scheduled every hour, the SQL Agent use a proxy to authenticate itself to the remote machine. Authentication seems to be ok but I get an error during loading of the SSIS package. This is what I get: Could not load package because of error 0xC001404A. Description: While trying to find a folder on SQL an OLE DB error was encountered with error