authorization

Hierarchical attributes in XACML Policy

别等时光非礼了梦想. 提交于 2021-02-07 09:28:34
问题 We are using WSO2 Identity Server 5.1.0 . We have a location hierarchy like Plant1->Area1->unit1. Now if a user is having attribute for the Plant1, he should get access to unit1 as well (all children of the parent in a tree). Can we specify this in XACML? We have the hierarchy stored in DB. We can provide the list of hierarchical elements as a list of attributes also if so required. Problem explained in sample : A user bob has been given access to area2 as shown below : Plant1 |--Area1 |-

OAuth is not secure or I didn't understand it?

浪尽此生 提交于 2021-02-07 05:12:40
问题 I was thinking about security for my REST web Service API, and decided to take a look at others large services and how they do it. As an example I decided to study Twitter's OAuth. After reading beginners guide I'm a little be confused and shocked. As I understood it's Service provider responsibility to authenticate user and to show User what kind of access consumer is demanding (for example it want's read only access to specific resource). But I saw service providers that doesn't inform user

OAuth is not secure or I didn't understand it?

徘徊边缘 提交于 2021-02-07 05:08:17
问题 I was thinking about security for my REST web Service API, and decided to take a look at others large services and how they do it. As an example I decided to study Twitter's OAuth. After reading beginners guide I'm a little be confused and shocked. As I understood it's Service provider responsibility to authenticate user and to show User what kind of access consumer is demanding (for example it want's read only access to specific resource). But I saw service providers that doesn't inform user

OAuth is not secure or I didn't understand it?

左心房为你撑大大i 提交于 2021-02-07 05:05:42
问题 I was thinking about security for my REST web Service API, and decided to take a look at others large services and how they do it. As an example I decided to study Twitter's OAuth. After reading beginners guide I'm a little be confused and shocked. As I understood it's Service provider responsibility to authenticate user and to show User what kind of access consumer is demanding (for example it want's read only access to specific resource). But I saw service providers that doesn't inform user

MVC 5 IsInRole Usage on Razor Views: Cannot connect to Database

人盡茶涼 提交于 2021-02-06 10:12:37
问题 I'm having issues using the new identity system in MVC 5, my goal is to make use of the User.IsinRole("RoleName") on Views. For example: @if(User.IsInRole("Administrator")) { <li>@Html.ActionLink("Admin", "Index", "Admin")</li> } This is placed in the main layout page which is hit when the application launches. On doing this, i'm getting the following error: "An exception of type 'System.Web.HttpException' occurred in System.Web.dll but was not handled in user code Additional information:

hide api key for a Github page

我是研究僧i 提交于 2021-02-05 20:17:19
问题 I have a github page for my organization where I would like to call data from a 3rd party api where I need an auth token. Can I publish this github page without having the auth token displayed on the public repo? 回答1: In short, no. If your GitHub repo is public, all its assets are public. You can make the repo private and it will still publish on GitHub Pages if named with the username.github.io convention or if it has a gh-pages branch. While that's an option, that's not necessarily the

Unauthorized 401 error while 'execute as me'

Deadly 提交于 2021-02-05 07:01:48
问题 I am struggling with a web app I have deployed. When the site permission is available to 'all with the link', as the app is set to 'execute as me', a spreadsheet is properly removed from my drive and a new file created. If I restrict access to certain email addresses, the code no longer works. I tried passing a token using var auth = ScriptApp.getOAuthToken(); var header = { "authorization": "Bearer " + auth }; var params = { 'method':'post', 'headers':header, 'muteHttpExceptions':true}; var

How can I automate getting an access token from Slack?

最后都变了- 提交于 2021-02-04 06:33:26
问题 I want to make an alert system on Apigee that will automatically send alerts to Slack, without the need for human interference. However, the only OAuth flow for Slack I found on their api site seems to require a user to manually input their credentials: https://api.slack.com/docs/oauth How can I automate getting an access token from Slack, so without having to manually input credentials? 回答1: I think you may have misunderstood the concept of Oauth. The way it is supposed to work is, that you

How to use hasRole in Spring Security?

心已入冬 提交于 2021-01-29 20:12:36
问题 I wrote SpringBoot application with authentication via web login form. Class WebSecurityController is responsible for authentication and authorization. Here is its code: @Controller @EnableWebSecurity public class WebSecurityController extends WebSecurityConfiguration { @Autowired DataSource dataSource; protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests() .antMatchers("/users/getAll").access("hasRole('ROLE_ADMIN')") .anyRequest().permitAll() .and()

How to use Keycloak Policy Enforcer with Spring boot application

天涯浪子 提交于 2021-01-29 11:25:59
问题 Keycloak policy enforcer not working with a sample Sprint boot application. I am using Keycloak version 6.0.1 and trying to integrate a sample Sprint boot application (Sprint boot version 2.1.3). My objective to setup policies and permissions in Keycloak and use Keycloak policy enforcer in my sample Spring boot application so that all authorization decisions are automatically enforced using appropriate permission defined in Keycloak and no code is required in Sample application. My Sample