Questions tagged [access-control]

Access control is the process of limiting the access of ability of users or services to certain resources.

Access control is the process of limiting the access of ability of users or services to certain resources.

Historically, there have been several access control models:

  • discretionary access control (DAC): In computer security, discretionary access control (DAC) is a type of access control defined by the Trusted Computer System Evaluation Criteria "as a means of restricting access to objects based on the identity of subjects and/or groups to which they belong. (source: Wikipedia)
  • mandatory access control (MAC): The mandatory part of the definition indicates that enforcement of controls is performed by administrators and the operating system. This is in contrast to the default security mechanism of Discretionary Access Control (DAC) where enforcement is left to the discretion of users.(source: wikipedia)
  • Role-based access control (RBAC): Role-based access control (RBAC) is a method of regulating access to computer or network resources based on the roles of individual users within an enterprise. RBAC was formally defined by NIST, the National Institute of Standards and Technology. More can be found on their website.
  • Attribute-based access control (ABAC): ABAC extends the way RBAC works. Instead of just focusing on user identities, roles, and groups, ABAC defines attributes (key-value pairs) that can be used to describe users, resources, actions, and context. With ABAC, it is possible to define finer-grained access policies. A common language used to define ABAC is XACML. NIST is currently formalizing ABAC. See their website for more information.
1370 questions
15
votes
2 answers

Alternatives for Roles/Claims Access Control Systems

I am developing REST API for the growing system. And in general Role/Claims Access Control work perfecly like this. [HttpGet] [Route("settings")] [Authorization(Type = AuthorizationType.Admin, Permission = Permission.StoreSettings)] public…
15
votes
4 answers

Role Based Access Control in Angular2?

I understand the working of JWT based authentication, but I am struggling to understand the correct approach to create a role based access control in angular2. Can some-one please provide a way to approach this problem, or some useful links.
ankitkamboj
  • 531
  • 2
  • 6
  • 14
15
votes
1 answer

Resource Based Access Control vs Role Based Access Control

I am learning Apache Shiro, and I found this article: The New RBAC: Resource-Based Access Control And the author said: .......you could assign behaviors (permissions) directly to a Role if you want. In this sense, you would still have a…
hguser
  • 35,079
  • 54
  • 159
  • 293
15
votes
4 answers

How can I restrict access to certain URLs by source IP in Tomcat?

I want to restrict access to certain URLs in my Tomcat webapp. Only 3 known IP addresses should be allowed access to URLs that fit a certain pattern. e.g. http://example.com:1234/abc/personId How can I achieve this?
Randeep
  • 533
  • 3
  • 7
  • 18
14
votes
1 answer

How to represent RESTful attribute level access control?

I've been wracking my brain and googling away for ages without coming up with a satisfactory way of handling this. I want to write a nice fully RESTful service to return resources, but the data you have permission to read (or write) variest…
Gareth Boden
  • 318
  • 1
  • 8
14
votes
3 answers

Is friendship inherited in C++?

Suppose I have a Base class: class Base { friend SomeOtherClass; }; And there is another (different) class that inherits from Base: class AnotherClass : public Base {} Is friendship inherited as well?
tunnuz
  • 23,338
  • 31
  • 90
  • 128
14
votes
1 answer

Does an in-class friend of a nested class have access to outer class members?

clang++, g++, and MSVC disagree on this code: class A { private: enum class E { NO, YES }; class B { private: friend E f1() { return E::YES; } // friend E f2(); }; }; // A::E f2() { return A::E::YES; } int main()…
aschepler
  • 70,891
  • 9
  • 107
  • 161
14
votes
2 answers

Accessing fileprivate and private variables in extension and another class using swift 4

I have been going through the recent swift docs and working out on few examples in understanding private and fileprivate keywords in swift4. I am trying to access a fileprivate and private variable in an extension of the same class and another class…
arun_K
  • 313
  • 1
  • 4
  • 12
13
votes
1 answer

Why does this static const int member variable appear to be accessible publicly in array definition?

I make the following declarations: class Servo { protected: static const int maxServos = 16; static Servo servos[maxServos]; //Array declaration }; Servo Servo::servos[Servo::maxServos]; //Array definition ...and it compiles, which…
13
votes
2 answers

Scope/Role/Group Based Access Control

I am using Azure Active Directory and am trying to understand the three types of access control described here. What are the advantages and disadvantages of each approach and when would you use them: Scope based access control using…
12
votes
4 answers

How to use PHP script for access control in Apache

I am looking for a way to use a PHP script to control access to resources in Apache. I want to have access control that does not depend on the target resource; i.e. it will work for html, files, other scripts and cgi programs, just as an "Allow…
Achronos
  • 143
  • 6
12
votes
4 answers

JAX-WS, Authentication and Authorization - How to?

What is the best way to do authentication and authorization in web services? I am developing a set of web services, requiring role based access control. Using metro - SOAP, simple java without EJBs. I want to Authenticate the user just one time,…
lpinto.eu
  • 2,077
  • 4
  • 21
  • 45
12
votes
7 answers

What is the difference between private and fileprivate in Swift 4

In Swift 4, since now private is visible in extensions also in the same source code file, how is it different from the fileprivate access modifier? Background: In Swift 3, private variables in a class are not visible in its extensions in the same…
crypt
  • 449
  • 5
  • 15
12
votes
2 answers

Extension method accessible only inside class

How do I create a method in an extension and have it only accessible inside the class (or its subclasses), like a private method, but declared in another file inside an extension? private won't work, because it has to be inside the same…
Rodrigo Ruiz
  • 4,248
  • 6
  • 43
  • 75
12
votes
5 answers

Keeping a troll out - IP bans considered harmful? What to use instead?

I run the technical side of a discussion forum, which is plagued by a troll (a single physical person, as far as I can tell). It seems that the community has exhausted all means of communication (it is, beyond reasonable doubt, a net.troll, not a…
Piskvor left the building
  • 91,498
  • 46
  • 177
  • 222