Interface DelegationRole

  • All Superinterfaces:
    Role

    @TypeAdapters
    @Immutable
    public interface DelegationRole
    extends Role
    A metadata file provided by a Delegated Targets role will follow exactly the same format as one provided by the top-level Targets role. A delegated role can specify additional targets scoped to a specific namespace for that delegated role.
    See Also:
    TUF delegated targets role documentation
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getName()
      A string giving the name of the delegated role.
      java.util.List<java.lang.String> getPaths()
      A list of strings, where each string is a PATHPATTERN describing a path that the delegated role is trusted to provide.
      boolean isTerminating()
      A boolean indicating whether subsequent delegations should be considered.
    • Method Detail

      • getName

        java.lang.String getName()
        A string giving the name of the delegated role. For example, "projects". The rolename MUST be unique in the delegations object: multiple roles with the same rolename are not allowed within a DELEGATIONS.
      • getPaths

        java.util.List<java.lang.String> getPaths()
        A list of strings, where each string is a PATHPATTERN describing a path that the delegated role is trusted to provide. Clients MUST check that a target is in one of the trusted paths of all roles in a delegation chain, not just in a trusted path of the role that describes the target file.

        PATHPATTERN supports the Unix shell pattern matching convention for paths (globbing pathnames). Its format may either indicate a path to a single file, or to multiple files with the use of shell-style wildcards (* or ?). To avoid surprising behavior when matching targets with PATHPATTERN, it is RECOMMENDED that PATHPATTERN uses the forward slash (/) as directory separator and does not start with a directory separator, as is also recommended for TARGETPATH. A path separator in a path SHOULD NOT be matched by a wildcard in the PATHPATTERN.

        Some example PATHPATTERNs and expected matches:

        "targets/*.tgz" would match file paths "targets/foo.tgz" and "targets/bar.tgz", but not "targets/foo.txt". "foo-version-?.tgz" matches "foo-version-2.tgz" and "foo-version-a.tgz", but not "foo-version-alpha.tgz". "*.tgz" would match "foo.tgz" and "bar.tgz", but not "targets/foo.tgz" "foo.tgz" would match only "foo.tgz"

      • isTerminating

        @Named("terminating")
        boolean isTerminating()
        A boolean indicating whether subsequent delegations should be considered.