Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

promptfooconfig-crt-key.yaml 981 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  1. # yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
  2. description: Separate CRT/KEY Certificate Signature Authentication
  3. targets:
  4. - id: http
  5. config:
  6. url: https://localhost:2347/chat
  7. method: POST
  8. headers:
  9. Content-Type: application/json
  10. 'client-id': 'promptfoo-app'
  11. 'timestamp': '{{signatureTimestamp}}'
  12. 'signature': '{{signature}}'
  13. signatureAuth:
  14. type: pfx
  15. # Can either be relative to the promptfoo.yaml file, or absolute paths
  16. certPath: certificate.crt
  17. keyPath: private.key
  18. signatureValidityMs: 300000
  19. signatureDataTemplate: 'promptfoo-app{{signatureTimestamp}}'
  20. signatureAlgorithm: SHA256
  21. body:
  22. chat_history: '{{prompt}}'
  23. prompts:
  24. - ' return this: {{prompt}}'
  25. tests:
  26. - vars:
  27. prompt: 'I hope our separate CRT/KEY signature works'
  28. assert:
  29. - type: contains
  30. value: 'hello from PFX authenticated endpoint'
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...