Skip to content

Conversation

IgorYurevich
Copy link
Contributor

@IgorYurevich IgorYurevich commented Sep 26, 2025

Pull Request description

  • Теперь regexp для пропуска проверки ключа можно настроить
    • добавлен параметр access.skip-exact-origins.enabled, если false - все запросы за векторными, растровыми, mapbox тайлами будут проверяться на ключ
    • если true и указан access.skip-exact-origins.regexp-pattern - то запросы с заголовком Origin попадающим под regexp не будет проверяться в сервисе ключей
  • Также regexp для регистрации bss статистики может быть настроен
    • добавлен параметр access.bss.register-exact-hosts.enabled, если false - все запросы будут регистрироваться в bss
    • если true и указан access.bss.register-exact-hosts.regexp-pattern - то только запросы с host попадающим под regexp будут регистрироваться в bss

Changelog

Issues

Breaking changes

  • If there are breaking changes, they need to be added to the file Breaking-Changes

Check-list. Чек-лист код-ревью

  • Запрос на слияние в develop.
  • Есть описание к PR.
  • Указаны блокирующие изменения. Breaking-Changes
  • Соответствие кода принятому стилю
    • Описание настроек.
    • Именование настроек.
    • Дефолтные значения.
    • Стиль кода.
  • Работоспособность. Разворачивается на своем окружении из ветки PR.
    • Тест API через тесты helmfile-хуков или коллекций Postman.
  • Не осталось мусора от удаления каких-то параметров. Ищется поиском по проекту из ветки PR.
  • Отработка линтера на чарт из ветки PR. Пример: helm lint charts/search-api

@IgorYurevich IgorYurevich self-assigned this Sep 26, 2025
@IgorYurevich IgorYurevich requested review from a team as code owners September 26, 2025 09:11
# @param proxy.access.raster.token Service key for raster data in Keys API. Used for key validation. If Keys API is unavailable or token is empty/invalid, tile service will continue to work without key validation (with warning in logs).
# @param proxy.access.vector.token Service key for vector data in Keys API. Used for key validation. If Keys API is unavailable or token is empty/invalid, tile service will continue to work without key validation (with warning in logs).

# @extra proxy.access.skipExactOrigins **Exact origins that will skip access key check**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В описании переменных не очень понятно поведение. В описании к ПРу прям хорошо расписано. Давай добавим сюда (ко всем переменным, которые принесли) аналогичное описание?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Поменял описание на более понятно, оно действительно было неочевидно

skipExactOrigins:
enabled: false
useDefaultValue: false
originRegexpPattern: ''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут помимо описания бы еще пример привести, в каком формате мы ожидаем заголовки

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Добавил пример


registerExactHosts:
enabled: false
useDefaultValue: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А зачем вот эта лишняя логика про дефолт? Вы не можете у себя при деплое просто использовать registerExactHosts.enabled true и registerExactHosts.hostRegexpPattern прописывать сами свое дефолтное значение?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Убрал


skipExactOrigins:
enabled: false
useDefaultValue: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

аналогично комменту про дефолт

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тоже убрал

@IgorYurevich IgorYurevich changed the title DRAFT: Basis 556 configure origin and host for access check and bss stats BASIS-556: configure origin and host for access check and bss stats Oct 3, 2025
@IgorYurevich IgorYurevich force-pushed the BASIS-556-configure-origin-and-host-for-access-check-and-bss-stats branch from bcb7a9b to 1b2360c Compare October 3, 2025 09:19
Comment on lines 248 to 249
# @extra proxy.access.stat.registerExactHosts **Register requests to BSS for exact hosts feature settings**
# @param proxy.access.stat.registerExactHosts.enabled If disabled, all requests will be registered in BSS, otherwise the only requests to exact hosts that matches regexp will be registered (hosts of tiles-api).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# @extra proxy.access.stat.registerExactHosts **Register requests to BSS for exact hosts feature settings**
# @param proxy.access.stat.registerExactHosts.enabled If disabled, all requests will be registered in BSS, otherwise the only requests to exact hosts that matches regexp will be registered (hosts of tiles-api).
# @extra proxy.access.stat.registerExactHosts **Register requests to stat-receiver for exact hosts feature settings**
# @param proxy.access.stat.registerExactHosts.enabled If disabled, all requests will be registered in stat-receiver, otherwise the only requests to exact hosts that matches regexp will be registered (hosts of tiles-api).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Поправил, спасибо

@dbelyaev-nsk
Copy link
Contributor

нужно обновить образ, в котором это поддержали

@dbelyaev-nsk
Copy link
Contributor

задача на проверку https://jira.2gis.ru/browse/ONPREM-2541

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

Successfully merging this pull request may close these issues.

4 participants