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

edge client api link factories are too indiscriminate #1608

Open
sabedevops opened this issue Nov 10, 2022 · 2 comments
Open

edge client api link factories are too indiscriminate #1608

sabedevops opened this issue Nov 10, 2022 · 2 comments
Labels
bug Something isn't working controller Issue related to the controller edge

Comments

@sabedevops
Copy link
Contributor

sabedevops commented Nov 10, 2022

ziti version: 0.26.10

Requests to the edge client api endpoints produce _links which are unfiltered for non-admin identities. These links cannot be followed by the client successfully as the identity lack permissions.

Example:

GET /edge/client/v1/services

{
  "_links": {
    "configs": {
      "href": "./services/6poaOHbjacJdG2wrZqhyND/configs"
    },
    "self": {
      "href": "./services/6poaOHbjacJdG2wrZqhyND"
    },
    "service-edge-router-policies": {
      "href": "./services/6poaOHbjacJdG2wrZqhyND/service-edge-router-policies"
    },
    "service-policies": {
      "href": "./services/6poaOHbjacJdG2wrZqhyND/service-policies"
    },
    "terminators": {
      "href": "./services/6poaOHbjacJdG2wrZqhyND/terminators"
    }
}

Attempt to follow _links.configs.

GET /edge/client/v1/services/6poaOHbjacJdG2wrZqhyND/configs

{
  "error": {
    "cause": {
      "code": "UNHANDLED",
      "message": "path /edge/client/v1/services/6poaOHbjacJdG2wrZqhyND/configs was not found"
    },
    "code": "NOT_FOUND",
    "message": "The resource requested was not found or is no longer available",
    "requestId": "B1TtnV.xng"
  },
  "meta": {
    "apiEnrollmentVersion": "0.0.1",
    "apiVersion": "0.0.1"
  }
}
@plorenz plorenz transferred this issue from openziti/edge Dec 14, 2023
@andrewpmartinez andrewpmartinez added bug Something isn't working controller Issue related to the controller edge labels Jul 24, 2024
@ekoby
Copy link
Member

ekoby commented Jul 24, 2024

clean up the links

@qrkourier
Copy link
Member

Here's what I get with 1.1.8 for /edge/client/v1/services

{
  "data": [
    {
      "_links": {
        "configs": {
          "href": "./services/6H9WrKOM1fLnitRRZ7B018/configs"
        },
        "self": {
          "href": "./services/6H9WrKOM1fLnitRRZ7B018"
        },
        "service-edge-router-policies": {
          "href": "./services/6H9WrKOM1fLnitRRZ7B018/service-edge-router-policies"
        },
        "service-policies": {
          "href": "./services/6H9WrKOM1fLnitRRZ7B018/service-policies"
        },
        "terminators": {
          "href": "./services/6H9WrKOM1fLnitRRZ7B018/terminators"
        }
      },
      "createdAt": "2024-07-24T15:21:21.974Z",
      "id": "6H9WrKOM1fLnitRRZ7B018",
      "tags": {},
      "updatedAt": "2024-07-24T15:21:21.974Z",
      "config": {},
      "configs": null,
      "encryptionRequired": true,
      "maxIdleTimeMillis": 0,
      "name": "kentest",
      "permissions": [
        "Invalid"
      ],
      "postureQueries": [
        {
          "isPassing": true,
          "policyId": "dummy invalid policy: no posture checks defined",
          "policyType": "Invalid",
          "postureQueries": []
        }
      ],
      "roleAttributes": null,
      "terminatorStrategy": "smartrouting"
    }
  ],
  "meta": {
    "filterableFields": [
      "isSystem",
      "terminatorStrategy",
      "updatedAt",
      "tags",
      "roleAttributes",
      "name",
      "id",
      "createdAt",
      "configs"
    ],
    "pagination": {
      "limit": 10,
      "offset": 0,
      "totalCount": 1
    }
  }
}

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

No branches or pull requests

4 participants