Bug 52827 - Change of ip address leads to HTTP 500 upon auth in the swagger ui
Change of ip address leads to HTTP 500 upon auth in the swagger ui
Status: NEW
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.4
Other Windows NT
: P5 normal (vote)
: ---
Assigned To: App Center maintainers
App Center maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-02-22 13:07 CET by Joerg Baach
Modified: 2021-02-22 15:22 CET (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joerg Baach univentionstaff 2021-02-22 13:07:38 CET
1) I have a vm with ucsschool and Kelvin API installed. 'Authorize' in the Kelvin API Swagger UI on https://10.200.79.8/ucsschool/kelvin/v1/docs works
2) The ip address is changed in https://10.200.79.9/univention/management/#module=setup:network:0: (...79.8 -> ...79.9)
3) Authorize at https://10.200.79.9/ucsschool/kelvin/v1/docs now gives "auth error Error: Internal Server Error". The logfile at /var/log/univention/ucsschool-kelvin-rest-api/http.log tells me:

2021-02-22 12:51:18 ERROR When connecting to 'ucs-9614.jbaach-schule2.intranet' with bind_dn 'cn=ucssc-60216355,cn=memberserver,cn=computers,dc=jbaach-schule2,dc=intranet': invalid server address
Traceback (most recent call last):
  File "/kelvin/kelvin-api/ucsschool/kelvin/ldap_access.py", line 144, in search
    with Connection(
  File "/usr/lib/python3.8/site-packages/ldap3/core/connection.py", line 355, in __init__
    self.do_auto_bind()
  File "/usr/lib/python3.8/site-packages/ldap3/core/connection.py", line 370, in do_auto_bind
    self.open(read_server_info=False)
  File "/usr/lib/python3.8/site-packages/ldap3/strategy/sync.py", line 56, in open
    BaseStrategy.open(self, reset_usage, read_server_info)
  File "/usr/lib/python3.8/site-packages/ldap3/strategy/base.py", line 150, in open
    raise LDAPSocketOpenError('invalid server address')
ldap3.core.exceptions.LDAPSocketOpenError: invalid server address
2021-02-22 12:51:18 INFO  172.17.42.1:38914 - "POST /ucsschool/kelvin/token HTTP/1.1" 500
2021-02-22 12:51:18 ERROR Exception in ASGI application
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 394, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "/usr/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
    return await self.app(scope, receive, send)
  File "/usr/lib/python3.8/site-packages/fastapi/applications.py", line 140, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/lib/python3.8/site-packages/starlette/applications.py", line 134, in __call__
    await self.error_middleware(scope, receive, send)
  File "/usr/lib/python3.8/site-packages/starlette/middleware/errors.py", line 178, in __call__
    raise exc from None
  File "/usr/lib/python3.8/site-packages/starlette/middleware/errors.py", line 156, in __call__
    await self.app(scope, receive, _send)
  File "/usr/lib/python3.8/site-packages/starlette/exceptions.py", line 73, in __call__
    raise exc from None
  File "/usr/lib/python3.8/site-packages/starlette/exceptions.py", line 62, in __call__
    await self.app(scope, receive, sender)
  File "/usr/lib/python3.8/site-packages/starlette/routing.py", line 590, in __call__
    await route(scope, receive, send)
  File "/usr/lib/python3.8/site-packages/starlette/routing.py", line 208, in __call__
    await self.app(scope, receive, send)
  File "/usr/lib/python3.8/site-packages/starlette/routing.py", line 41, in app
    response = await func(request)
  File "/usr/lib/python3.8/site-packages/fastapi/routing.py", line 127, in app
    raw_response = await dependant.call(**values)
  File "/kelvin/kelvin-api/ucsschool/kelvin/main.py", line 139, in login_for_access_token
    user = await ldap_auth_instance.check_auth_and_get_user(
  File "/kelvin/kelvin-api/ucsschool/kelvin/ldap_access.py", line 115, in check_auth_and_get_user
    user_dn = await self.get_dn_of_user(username)
  File "/kelvin/kelvin-api/ucsschool/kelvin/ldap_access.py", line 206, in get_dn_of_user
    results = await self.search(filter_s, attributes=None)
  File "/kelvin/kelvin-api/ucsschool/kelvin/ldap_access.py", line 144, in search
    with Connection(
  File "/usr/lib/python3.8/site-packages/ldap3/core/connection.py", line 355, in __init__
    self.do_auto_bind()
  File "/usr/lib/python3.8/site-packages/ldap3/core/connection.py", line 370, in do_auto_bind
    self.open(read_server_info=False)
  File "/usr/lib/python3.8/site-packages/ldap3/strategy/sync.py", line 56, in open
    BaseStrategy.open(self, reset_usage, read_server_info)
  File "/usr/lib/python3.8/site-packages/ldap3/strategy/base.py", line 150, in open
    raise LDAPSocketOpenError('invalid server address')
ldap3.core.exceptions.LDAPSocketOpenError: invalid server address
Comment 1 Daniel Tröder univentionstaff 2021-02-22 15:22:37 CET
This is a problem in the appcenter.
When the hosts IP address changes, it must reinitialize all Docker apps, so they get to know the hosts new IP address.