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

Unresolvable api/versions urls in production #122

Open
frenchy64 opened this issue Dec 20, 2024 · 3 comments
Open

Unresolvable api/versions urls in production #122

frenchy64 opened this issue Dec 20, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@frenchy64
Copy link

This might be a configuration issue, but port 8000 is not open to the internet so these url's don't work.

curl -X GET "https://schema.ocsf.io/api/versions" -H "accept: application/json"
{
  "default": {
    "version": "1.3.0",
    "url": "http://schema.ocsf.io:8000/1.3.0/api"
  },
  "versions": [
    {
      "version": "1.0.0",
      "url": "http://schema.ocsf.io:8000/1.0.0/api"
    },
    {
      "version": "1.0.0-rc.2",
      "url": "http://schema.ocsf.io:8000/1.0.0-rc.2/api"
    },
    {
      "version": "1.0.0-rc.3",
      "url": "http://schema.ocsf.io:8000/1.0.0-rc.3/api"
    },
    {
      "version": "1.1.0",
      "url": "http://schema.ocsf.io:8000/1.1.0/api"
    },
    {
      "version": "1.2.0",
      "url": "http://schema.ocsf.io:8000/1.2.0/api"
    },
    {
      "version": "1.3.0",
      "url": "http://schema.ocsf.io:8000/1.3.0/api"
    },
    {
      "version": "1.4.0-dev",
      "url": "http://schema.ocsf.io:8000/1.4.0-dev/api"
    }
  ]
}
@rmouritzen-splunk
Copy link
Contributor

Ugh. Yes. This is side effect of the convoluted way different versions of the schema are handled. The entire site is fronted by nginx which proxies the traffic to the actual web app, each of which is running in a separate Docker container.

Fun fact: every OCSF Schema release requires running an additional Docker container. Ugh.

I'm going to hold off fixing for now since there is a strong need to rewrite this app so a single instance handles all schema versions.

@rmouritzen-splunk rmouritzen-splunk added the bug Something isn't working label Feb 5, 2025
@nsmithuk
Copy link

Hello

As an extension to this it doesn't look like the URLs are working, even with a standard port and protocol. I see a 404 back.

For example

% http https://schema.ocsf.io/1.3.0/api

HTTP/1.1 404 Not Found
Connection: keep-alive
Content-Length: 9
Content-Type: text/html; charset=utf-8
Date: Sat, 15 Feb 2025 13:59:36 GMT
Server: nginx/1.18.0 (Ubuntu)
cache-control: max-age=0, private, must-revalidate
x-request-id: GCRmbZFT9P4G_88AAEWB

Not Found

This is impacting https://github.com/ocsf/ocsf-lib-py, which seems to rely on this endpoint.

@rmouritzen-splunk
Copy link
Contributor

The /api URL has never had a handler -- it has always resulting in a 404.
https://schema.ocsf.io/doc/index.html

(I'm not saying this is a good idea, just that it's always been this way.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants