Browse Source

internal auth & authorization

* do not handle authorization from internal sources
* do not remove authorization from internal sources

* when connecting to external from internal, a 401/407 may be returned
  and we relay that info back to media server, which will issue a new request
  with authorization, and we need to pass that info to external

(cherry picked from commit 69df3e373d)
5.0 5.0.25
Luis Azedo 5 years ago
parent
commit
ecc3fe1a66
2 changed files with 9 additions and 3 deletions
  1. +5
    -0
      kamailio/authorization.cfg
  2. +4
    -3
      kamailio/default.cfg

+ 5
- 0
kamailio/authorization.cfg View File

@ -79,6 +79,11 @@ route[AUTHORIZATION_CHECK_REGISTERED]
route[HANDLE_AUTHORIZATION]
{
if (isflagset(FLAG_INTERNALLY_SOURCED)) {
route(MAIN);
exit;
}
if(!is_present_hf("Proxy-Authorization")) {
route(MAIN);
exit;


+ 4
- 3
kamailio/default.cfg View File

@ -251,9 +251,10 @@ route
route[MAIN]
{
route(AUTHORIZATION);
remove_hf("Authorization");
if (!isflagset(FLAG_INTERNALLY_SOURCED)) {
route(AUTHORIZATION);
remove_hf("Authorization");
}
#!ifdef MESSAGE_ROLE
route(HANDLE_MESSAGE);


Loading…
Cancel
Save