Support catalogue restriction through nested claims

Đang mở
#497 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
java

Hướng nghiên cứu

Bắt đầu bằng cách xác định phần xử lý restriction của service-catalogue và việc đánh giá JWT root-claim trong Onyxia API. Xem xét cách các cấu hình restriction hiện có được biểu diễn trước khi chọn cấu trúc cho nested-claim. Done phải bao gồm khả năng lồng nhau tùy ý, so khớp các giá trị trong các danh sách lồng nhau, các khóa map an toàn với dấu chấm và không làm hỏng các cấu hình hiện có.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Currently access to service catalogues can only be restricted based on root claims in the JWT. In some cases it would be useful to restrict access based on some nested property in the token.

E.g. we have a custom claim:

{
  "custom": {
    "custom2": {
      "someList": [ "a", "b" ]
    }
  }
}

And would like to restrict access to a catalogue based on the presence of an item in custom.someList (this could be a list of access groups a user is in, for example).

Of course, periods are valid characters in a map key, so some thought will have to be given to how this is handled. In addition, arbitrary amounts of nesting should be supported, and it should not break existing configurations of Onyxia.. Perhaps something similar to this could work:

"restrictions": [
  {
    "userAttribute": {
      "subAttribute": ["custom", "custom2"]
      "key": "someList",
      "matches": "b"
    }
  }
]

where subAttribute is an ordered list of attributes to traverse through in the JWT. Another way could be to use some nested object,

"restrictions": [
  {
    "nestedUserAttribute": {
      "key": "custom",
      "nestedUserAttribute": {
        "key": "custom2",
        "userAttribute": {
          "key": "someList",
          "matches": "b"
        }
      }
    }
  }
]

These are of course just suggestions off the top of my head, there are probably much better ways of solving it 😀

Ngôn ngữ chính
Java
Star
34
Fork
34
Merge trung bình
9 phút
Pull request đã merge (30 ngày)
4

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của InseeFrLab/onyxia-api

Tất cả issue của InseeFrLab/onyxia-api

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.