Skip to content

Server-Configuration

OIDC Configuration

hcl
oidc = {
  provider      = "https://example.com/oidc"
  audience      = "feedback-fusion"
  issuer        = "https://issuer.example.com"
  group_claim   = "groups"
  scopes = [
    {
      # thats the name of the scope
      name = "ApiAccess"
      grants = [
        {
          endpoint = {
            # the first element here defines which ID's of resources to target, the second one defined the endpoints
            Custom = ["*", "All"]
          }
          permissions = ["All"]
        }
      ]
    },
    {
      name = "ReadAccess"
      grants = [
        {
          endpoint = {
            # the first element here defines which ID's of resources to target, the second one defined the endpoints
            Custom = ["*", "All"]
          }
          permissions = ["Read", "List"]
        }
      ]
    }
  ]
  groups = [
    {
      # thats the name of the group
      name = "admin"
      grants = [
        {
          endpoint = {
            # the first element here defines which ID's of resources to target, the second one defined the endpoints
            Custom = ["*", "All"]
          }
          permissions = ["All"]
        }
      ]
    },
    {
      name = "examples"
      grants = [
        {
          endpoint = {
            Target = {
              # affects targets with the exact id 'Some-id'
              Specific = "Some-id"
            }
          }
          permissions = ["All"]
        },
        {
          endpoint = {
            Target = {
              # Affects targets that match the wildcard 'Some*id' e.g 'Somefooid' or 'Someid'
              Wildcard = "Some*id"
            }
          }
          permissions = ["All"]
        },
        {
          endpoint = {
            Target = {
              # affects the listed ids
              Multiple = ["foo", "bar"]
            }
          }
          permissions = ["All"]
        },
      ]
    }
  ]
}

OIDC Configuration Reference

ParameterDescriptionDefaultData Type
providerOIDC provider URLN/AString
audienceAudience for OIDC tokens"feedback-fusion"String
issuerOptional issuer URL for OIDCN/AString
group_claimName of the claim that contains user groups"groups"String
scopesAccess scopes and permissionsN/AList
groupsUser groups and their permissionsN/AList

Available Endpoints and Permissions

  • Endpoints: "Target", "Prompt", "Field", "Response", "Export", "Authorize"
  • Permissions: "Read", "Write", "List", "All"

OTLP Configuration

hcl
otlp = {
  endpoint     = "https://otlp.example.com"
  service_name = "feedback-fusion"
}

OTLP Configuration Reference

ParameterDescriptionDefaultData Type
endpointOTLP endpoint for trace spansN/AString
service_nameService name used in tracing context"feedback-fusion"String

Database Configuration

PostgreSQL

hcl
database = {
  postgres = {
    endpoint = "localhost:5432"
    username = "postgres_user"
    password = "postgres_password"
    database = "postgres_db"
  }
}

PostgreSQL Configuration Reference

ParameterDescriptionDefaultData Type
endpointPostgreSQL hostname and portN/AString
usernameUsername for PostgreSQLN/AString
passwordPassword for PostgreSQLN/AString
databaseName of the PostgreSQL databaseN/AString

MySQL / MariaDB

hcl
database = {
  mysql = {
    endpoint = "localhost:3306"
    username = "mysql_user"
    password = "mysql_password"
    database = "mysql_db"
  }
}

MySQL / MariaDB Configuration Reference

ParameterDescriptionDefaultData Type
endpointMySQL/MariaDB hostname and portN/AString
usernameUsername for MySQL/MariaDBN/AString
passwordPassword for MySQL/MariaDBN/AString
databaseName of the MySQL/MariaDB databaseN/AString

MSSQL

hcl
database = {
  mssql = {
    endpoint                 = "localhost:1433"
    username                 = "mssql_user"
    password                 = "mssql_password"
    database                 = "mssql_db"
    encrypt                  = true
    trust_server_certificate = true
  }
}

MSSQL Configuration Reference

ParameterDescriptionDefaultData Type
endpointMSSQL hostname and portN/AString
usernameUsername for MSSQLN/AString
passwordPassword for MSSQLN/AString
databaseName of the MSSQL databaseN/AString
encryptEncrypt connection to MSSQLtrueBoolean
trust_server_certificateTrust server certificate for MSSQLtrueBoolean

Presets

Example:

hcl
preset = {
  targets = [
    {
      id          = "target"
      name        = "TestTarget"
      description = "A nice Target"
      prompts = [
        {
          id          = "prompt"
          title       = "Testprompt"
          description = "A nice Prompt"
          active      = true
          fields = [
            {
              id         = "field1"
              title      = "TextField"
              field_type = "text"
              options = {
                type        = "text"
                lines       = 1
                placeholder = "test"
              }
            }
          ]
        }
      ]
    }
  ]
}