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
12
votes
2 answers

Detecting elevated privileges on Windows Server 2008 or higher

I have an C#, .Net 4.6.1 Windows Forms Application running on Windows Server Platforms (2008 or higher) which requires to be "Run as Administrator". Elevated privileges are required because the application changes User Access Rights on various…
Mats
  • 14,902
  • 33
  • 78
  • 110
12
votes
1 answer

Request header field X-CSRFToken is not allowed by Access-Control-Allow-Headers in preflight response

I'm trying to make an API call to the GroupMe API to fetch a JSON response but have been getting the following error: XMLHttpRequest cannot load ...(call url)... Request header field X-CSRFToken is not allowed by Access-Control-Allow-Headers in…
12
votes
2 answers

Multi-tenant Access Control: Repository or Service layer?

In a multi-tenant ASP.NET MVC application based on Rob Conery's MVC Storefront, should I be filtering the tenant's data in the repository or the service layer? 1. Filter tenant's data in the repository: public interface IJobRepository { …
Petrus Theron
  • 27,855
  • 36
  • 153
  • 287
12
votes
2 answers

Template class friendship

I recently came across a c++ piece of code where a class is made friend to itself. As I have read on different forums a class is already a friend to itself. So I was wondering if there is a specific reason why one would want to make a class friend…
AleC
  • 579
  • 3
  • 7
  • 15
12
votes
2 answers

Origin header missing from cross origin request to S3 on Chrome

I am trying to load an asset (a font) from an s3 bucket. Fonts on Firefox and IE need to have Access-Control-Allow-Origin headers returned in the response. Unfortunately it seems that Chrome is not sending an "Origin" request header. Since it is not…
Evan
  • 7,396
  • 4
  • 32
  • 31
12
votes
8 answers

friend class with inheritance

If I have two Classes as follows with inheritance: class A { ... } class B : public A { ... } And a third class with defined as a friend class A: class C { friend class A; } Will I be able to access from class B (which is also an…
Harry
  • 1,362
  • 12
  • 19
11
votes
2 answers

Swift access control on protocol conformance

I have a private protocol defined in a file as below private protocol testProtocol { func testFunc1() func testFunc2() } A public class conforms to the above protocol as follows public class testClass : testProtocol { func testFunc1() {} func…
Shalini Yadav
  • 111
  • 1
  • 5
11
votes
1 answer

Can we use IndexedDB between two pages on different domains?

I have created a IndexdDB object store in my one page (Let object store name is "ShopStore"). Now I want to open the same object store from a diffirent page. Is it possible? My two web pages are on different domain.
rohit gora
  • 113
  • 1
  • 5
11
votes
3 answers

c++ using declaration, scope and access control

Typically the 'using' declaration is used to bring into scope some member functions of base classes that would otherwise be hidden. From that point of view it is only a mechanism for making accessible information more convenient to use. However: the…
haselhorstk
  • 169
  • 1
  • 1
  • 7
10
votes
1 answer

Hyperledger Fabric Composer - restricting access rights of system administrators

My question is on access control in hyperledger fabric composer. Assume you have a business network, in which you have the following participants: Sellers (Potential) Buyers A seller is an employee of a company that sells products to a buying…
10
votes
3 answers

Why are private fields on an enum type visible to the containing class?

public class Parent { public enum ChildType { FIRST_CHILD("I am the first."), SECOND_CHILD("I am the second."); private String myChildStatement; ChildType(String myChildStatement) { …
user4903
10
votes
3 answers

Very fast hash function for hashing 8-16 byte strings

I need a very fast string hashing function, that fits well with web application written in PHP. The problem I am trying to overcome is assigning IDs to permissions in an access control system. I am thinking about using hashed strings to represent…
ezpresso
  • 7,896
  • 13
  • 62
  • 94
10
votes
2 answers

How to make a Swift framework submodule really private?

I've found another question which brings more details regarding the problem and possible solutions. It seems like there is a known bug which is a subject for future improvements. Objective C classes within an iOS Swift-based dynamic framework I'm…
kas-kad
  • 3,736
  • 1
  • 26
  • 45
10
votes
2 answers

What is a good pattern for implementing access control in a GraphQL server?

Background: I have a set of models, including a User and various other models, some of which contain references to a User. I am exposing these models for querying via a GraphQL API generated by Graffiti, backed by a Mongo database using the…
Alec
  • 197
  • 3
  • 10
10
votes
1 answer

How to store rights? alternatives to XACML

for a proof of concept i want to store rights. I know there are different ways of access control (DAC, MAC, RBAC,..). My first idea was using a database, but I'm looking for some more etablished standards like XACML but unfortunately I have not been…
btzs
  • 1,048
  • 3
  • 14
  • 17