rcds.yaml — Project Config

The file rcds.yaml defines the configuration for the current project, and its location also defines the root of the project. .yml and .json files are also supported. Challenges will be searched for in subdirectories of the project root. This file contains various global configuration options, including for the backends and Docker containers

Docker

docker.image.prefix (required) — the prefix for generated Docker image tags. This should contain the registry and “directory” — e.g. gcr.io/redpwn/challs.

docker.image.template — the Jinja template to create image tags with; it is joined with docker.image.prefix. Defaults to rcds-{{ challenge.id }}-{{ container.name }}.

Misc

defaults — default options to set on challenges. This key takes an object of the same shape as challenge.yaml. Setting defaults on keys like expose and containers will apply the defaults to all exposed ports and containers, respectively.

Note

An example of setting default resource limits on all containers which don’t otherwise specify limits:

defaults:
  containers:
    resources:
      limits:
        cpu: 100m
        memory: 150Mi
      requests:
        cpu: 10m
        memory: 30Mi

flagFormat — a regex to test all (static) flags against.

Reference

http://rcds.redpwn.com/schemas/rcds.yaml

type

object

properties

  • docker

Settings for the docker images that will be built for challenges.

type

object

properties

  • image

Settings controlling the generation of tags for built docker images.

type

object

properties

  • prefix

Prefix for the docker image. This is will be joined as a URL component with the image name as determined by the template. This would include the regsitry url if you are not planning to use Docker Hub.

type

string

examples

redpwn

quay.io/redpwn

  • template

Template for the name of the docker image.

type

string

default

rcds-{{ challenge.id }}-{{ container.name }}

  • backends

Deployment backends to use. Backends earlier in the array have higher precedence.

type

array

default

items

type

object

properties

  • resolve

The name of this backend (either the name of one of rCDS’s internal backends, or its fully qualified module name).

type

string

  • options

Options for this backend.

type

object

default

  • required

[‘resolve’, ‘options’]

  • defaults

Default options for challenges. Values for array / mapping keys such as expose and containers will be applied to each individual item within that key (on the level where a concrete schema is defined).

type

object

not

  • flagFormat

(Optional) regex to validate all flags against. Will be surrounded with ^$.

type

string

format

regex

Raw schema:

$schema: http://json-schema.org/draft-07/schema#
$id: http://rcds.redpwn.com/schemas/rcds.yaml
type: object
properties:
  docker:
    type: object
    description: >-
      Settings for the docker images that will be built for challenges.
    properties:
      image:
        type: object
        description: >-
          Settings controlling the generation of tags for built docker images.
        properties:
          prefix:
            type: string
            description: >-
              Prefix for the docker image. This is will be joined as a URL
              component with the image name as determined by the template. This
              would include the regsitry url if you are not planning to use
              Docker Hub.
            examples:
            - redpwn
            - quay.io/redpwn
          template:
            type: string
            description: >-
              Template for the name of the docker image.
            default: "rcds-{{ challenge.id }}-{{ container.name }}"
        required:
        - prefix
        - template
    required:
    - image
  backends:
    type: array
    description: >-
      Deployment backends to use. Backends earlier in the array have higher
      precedence.
    items:
      type: object
      properties:
        resolve:
          type: string
          description: >-
            The name of this backend (either the name of one of rCDS's internal
            backends, or its fully qualified module name).
        options:
          type: object
          description: >-
            Options for this backend.
          default: {}
        required:
        - resolve
        - options
    default: []
  defaults:
    type: object
    description: >-
      Default options for challenges. Values for array / mapping keys such as
      `expose` and `containers` will be applied to each individual item within
      that key (on the level where a concrete schema is defined).
    not:
      anyOf:
        # Properties that are not allowed to have defaults
      - required: ['id']
  flagFormat:
    type: string
    description: >-
      (Optional) regex to validate all flags against. Will be surrounded with `^$`.
    format: regex
required:
- backends