Class ValidationSettings

    • Method Detail

      • mode

        public final ValidationMode mode()

        The validation mode currently configured for this policy store. The valid values are:

        • OFF – Neither Verified Permissions nor Cedar perform any validation on policies. No validation errors are reported by either service.

        • STRICT – Requires a schema to be present in the policy store. Cedar performs validation on all submitted new or updated static policies and policy templates. Any that fail validation are rejected and Cedar doesn't store them in the policy store.

        If Mode=STRICT and the policy store doesn't contain a schema, Verified Permissions rejects all static policies and policy templates because there is no schema to validate against.

        To submit a static policy or policy template without a schema, you must turn off validation.

        If the service returns an enum value that is not available in the current SDK version, mode will return ValidationMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from modeAsString().

        Returns:
        The validation mode currently configured for this policy store. The valid values are:

        • OFF – Neither Verified Permissions nor Cedar perform any validation on policies. No validation errors are reported by either service.

        • STRICT – Requires a schema to be present in the policy store. Cedar performs validation on all submitted new or updated static policies and policy templates. Any that fail validation are rejected and Cedar doesn't store them in the policy store.

        If Mode=STRICT and the policy store doesn't contain a schema, Verified Permissions rejects all static policies and policy templates because there is no schema to validate against.

        To submit a static policy or policy template without a schema, you must turn off validation.

        See Also:
        ValidationMode
      • modeAsString

        public final String modeAsString()

        The validation mode currently configured for this policy store. The valid values are:

        • OFF – Neither Verified Permissions nor Cedar perform any validation on policies. No validation errors are reported by either service.

        • STRICT – Requires a schema to be present in the policy store. Cedar performs validation on all submitted new or updated static policies and policy templates. Any that fail validation are rejected and Cedar doesn't store them in the policy store.

        If Mode=STRICT and the policy store doesn't contain a schema, Verified Permissions rejects all static policies and policy templates because there is no schema to validate against.

        To submit a static policy or policy template without a schema, you must turn off validation.

        If the service returns an enum value that is not available in the current SDK version, mode will return ValidationMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from modeAsString().

        Returns:
        The validation mode currently configured for this policy store. The valid values are:

        • OFF – Neither Verified Permissions nor Cedar perform any validation on policies. No validation errors are reported by either service.

        • STRICT – Requires a schema to be present in the policy store. Cedar performs validation on all submitted new or updated static policies and policy templates. Any that fail validation are rejected and Cedar doesn't store them in the policy store.

        If Mode=STRICT and the policy store doesn't contain a schema, Verified Permissions rejects all static policies and policy templates because there is no schema to validate against.

        To submit a static policy or policy template without a schema, you must turn off validation.

        See Also:
        ValidationMode
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)