Skip to content

Security

42Atomys edited this page Jun 7, 2022 · 7 revisions

Introduced in 0.4

Built-ins

42School

- name: gitlab
  entrypointUrl: /webhooks/42
  security:
  - header:
      inputs:
      - name: headerName
        value: X-Secret
  - compare:
      inputs:
      - name: first
        value: '{{ .Outputs.header.value }}'
      - name: second
        valueFrom:
          envRef: FT_WEBHOOK_SECRET
  storage: []

Github

- name: github
  entrypointUrl: /webhooks/github
  security:
  - generate_hmac_256:
      id: signature
      inputs:
      - name: payload
        value: '{{ .Inputs.payload }}'
      - name: secret
        valueFrom:
          envRef: GITHUB_WEBHOOK_SECRET 
  - header:
      id: headerSignature
      inputs:
      - name: headerName
        value: X-Hub-Signature-256
  - compare:
      inputs:
      - name: first
        value: '{{ .Outputs.headerSignature.value }}'
      - name: second
        value: 'sha256={{ .Outputs.signature.value }}'
  storage: []

Gitlab

- name: gitlab
  entrypointUrl: /webhooks/gitlab
  security:
  - header:
      inputs:
      - name: headerName
        value: X-Gitlab-Token
  - compare:
      inputs:
      - name: first
        value: '{{ .Outputs.header.value }}'
      - name: second
        valueFrom:
          envRef: GITLAB_WEBHOOK_TOKEN
  storage: []
Clone this wiki locally