Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When queries to individual pem file, seems dataplaneapi not able to find pem file #337

Open
broxio opened this issue Jun 7, 2024 · 0 comments

Comments

@broxio
Copy link

broxio commented Jun 7, 2024

I have pem file store in /etc/haproxy/ssl/ directory. I am trying to access the pem file using the following endpoint.
the content of pem file is as follows:

-----BEGIN CERTIFICATE-----
certXXXXXXXXXX
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
chainXXXXXXXXXX
-----END CERTIFICATE-----
-----BEGIN PRIVATE KEY-----
keyXXXXXXXXX
-----END PRIVATE KEY-----

the following is the response of the endpoint that lists all the pem files in the directory.

endpoint : /v2/services/haproxy/storage/ssl_certificates
[
  {
    "description": "managed SSL file",
    "file": "/etc/haproxy/ssl/le_wildcard_example.com.pem",
    "storage_name": "le_wildcard_example.com.pem"
  },
  {
    "description": "managed SSL file",
    "file": "/etc/haproxy/ssl/le_wildcard_foobar.com.pem",
    "storage_name": "le_wildcard_foobar.com.pem"
  }
]

but when I try to queries to individual pem file, it is not working as expected.

endpoint: /v2/services/haproxy/storage/ssl_certificates/le_wildcard_example.com.pem
{
  "code": 404,
  "message": "missing object: file le_wildcard_example.com.pem doesn't exist in dir: /etc/haproxy/ssl"
}

permisssion is 644 for the pem file. I am not sure what is the issue here.
haproxy is running on 3.0.0 and dataplane api is 2.9.3 and below is dataplaneapi configuration

dataplaneapi.yml

config_version: 2
name: devmachine
mode: single
dataplaneapi:
  socket_path: /var/run/data-plane.sock
  debug_socket_path: /var/run/dataplane-debug.sock
  host: 0.0.0.0
  port: 5555
  advertised:
    api_address: ""
    api_port: 0
  scheme:
  - http
  userlist:
    userlist: dataplaneapi
  transaction:
    transaction_dir: /var/lib/dataplaneapi/transactions
    backups_number: 10
    backups_dir: /var/lib/dataplaneapi/backups
  resources:
    maps_dir: /etc/haproxy/maps
    ssl_certs_dir: /etc/haproxy/ssl
    general_storage_dir: /etc/haproxy/general
    spoe_dir: /etc/haproxy/spoe
  user:
  - name: xxx
    insecure: true
    password: xxx
@broxio broxio changed the title when queries to individual pem file, seems dataplaneapi not able to find pem file When queries to individual pem file, seems dataplaneapi not able to find pem file Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant