Enum Class SecurityLattice

java.lang.Object
java.lang.Enum<SecurityLattice>
com.darkcollective.relix.provenance.SecurityLattice
All Implemented Interfaces:
Semiring<SecurityLevel>, Serializable, Comparable<SecurityLattice>, Constable

public enum SecurityLattice extends Enum<SecurityLattice> implements Semiring<SecurityLevel>
The security / access-control lattice semiring over SecurityLevel (min, max) — propagates a confidentiality (clearance) level through a query so each output tuple carries the level at which it may be released.

⊕ is min (a tuple derivable two ways is released at the most accessible of them), ⊗ is max (a join is only as releasable as its most restrictive input). The identities follow from the total order PUBLIC < CONFIDENTIAL < SECRET < TOP_SECRET: 0 is SecurityLevel.TOP_SECRET (the min identity and absent/unreachable element) and 1 is SecurityLevel.PUBLIC (the max identity). Annihilation holds because max(TOP_SECRET, x) == TOP_SECRET, and max distributes over min.

  • Enum Constant Details

    • INSTANCE

      public static final SecurityLattice INSTANCE
      The singleton instance.
  • Method Details

    • values

      public static SecurityLattice[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SecurityLattice valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • zero

      public SecurityLevel zero()
      Description copied from interface: Semiring
      Returns the additive identity 0. It is the identity of Semiring.plus(K, K) and the annihilator of Semiring.times(K, K), and denotes an absent tuple.
      Specified by:
      zero in interface Semiring<SecurityLevel>
      Returns:
      the additive identity 0
    • one

      public SecurityLevel one()
      Description copied from interface: Semiring
      Returns the multiplicative identity 1. It is the identity of Semiring.times(K, K).
      Specified by:
      one in interface Semiring<SecurityLevel>
      Returns:
      the multiplicative identity 1
    • plus

      Description copied from interface: Semiring
      Combines two annotations with ⊕ — the way alternative derivations of the same tuple (union, projection) are merged. Associative and commutative, with identity Semiring.zero().
      Specified by:
      plus in interface Semiring<SecurityLevel>
      Parameters:
      a - the first annotation
      b - the second annotation
      Returns:
      a ⊕ b
    • times

      Description copied from interface: Semiring
      Combines two annotations with ⊗ — the way the joint requirements of a tuple (join, product) are merged. Associative and commutative, with identity Semiring.one(), annihilated by Semiring.zero().
      Specified by:
      times in interface Semiring<SecurityLevel>
      Parameters:
      a - the first annotation
      b - the second annotation
      Returns:
      a ⊗ b