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

ValidationError when calling the AssumeRole operation #9250

Closed
Rayv1 opened this issue Sep 24, 2021 · 2 comments
Closed

ValidationError when calling the AssumeRole operation #9250

Rayv1 opened this issue Sep 24, 2021 · 2 comments

Comments

@Rayv1
Copy link

Rayv1 commented Sep 24, 2021

Hi,

when I wanted to apply a request, I got the message "An error occured" Internal Server Error. I checked the Cloudwatch logs and saw the following error:

`

| 2021-09-24T12:09:39.481+02:00 | HTTPServerRequest(protocol='http', host='xxxxx', method='PUT', uri='/api/v2/requests/b4d36699-ac14-44ea-a08e-2d9316472c01', version='HTTP/1.1', remote_ip='10.0.21.89')
  | 2021-09-24T12:09:39.482+02:00 | Traceback (most recent call last):
  | 2021-09-24T12:09:39.482+02:00 | File "/usr/local/lib/python3.8/site-packages/tornado/web.py", line 1704, in _execute
  | 2021-09-24T12:09:39.482+02:00 | result = await result
  | 2021-09-24T12:09:39.482+02:00 | File "/apps/consoleme/consoleme/handlers/v2/requests.py", line 734, in put
  | 2021-09-24T12:09:39.482+02:00 | response = await parse_and_apply_policy_request_modification(
  | 2021-09-24T12:09:39.482+02:00 | File "/apps/consoleme/consoleme/lib/v2/requests.py", line 2612, in parse_and_apply_policy_request_modification
  | 2021-09-24T12:09:39.482+02:00 | await apply_changes_to_role(
  | 2021-09-24T12:09:39.482+02:00 | File "/apps/consoleme/consoleme/lib/v2/requests.py", line 882, in apply_changes_to_role
  | 2021-09-24T12:09:39.482+02:00 | iam_client = await sync_to_async(boto3_cached_conn)(
  | 2021-09-24T12:09:39.482+02:00 | File "/usr/local/lib/python3.8/site-packages/asgiref/sync.py", line 444, in call
  | 2021-09-24T12:09:39.482+02:00 | ret = await asyncio.wait_for(future, timeout=None)
  | 2021-09-24T12:09:39.482+02:00 | File "/usr/local/lib/python3.8/asyncio/tasks.py", line 455, in wait_for
  | 2021-09-24T12:09:39.482+02:00 | return await fut
  | 2021-09-24T12:09:39.482+02:00 | File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
  | 2021-09-24T12:09:39.482+02:00 | result = self.fn(*self.args, **self.kwargs)
  | 2021-09-24T12:09:39.482+02:00 | File "/usr/local/lib/python3.8/site-packages/asgiref/sync.py", line 486, in thread_handler
  | 2021-09-24T12:09:39.482+02:00 | return func(*args, **kwargs)
  | 2021-09-24T12:09:39.482+02:00 | File "/usr/local/lib/python3.8/site-packages/cloudaux/aws/sts.py", line 157, in boto3_cached_conn
  | 2021-09-24T12:09:39.482+02:00 | role = sts.assume_role(**assume_role_kwargs)
  | 2021-09-24T12:09:39.482+02:00 | File "/usr/local/lib/python3.8/site-packages/botocore/client.py", line 386, in _api_call
  | 2021-09-24T12:09:39.482+02:00 | return self._make_api_call(operation_name, kwargs)
  | 2021-09-24T12:09:39.482+02:00 | File "/usr/local/lib/python3.8/site-packages/botocore/client.py", line 705, in _make_api_call
  | 2021-09-24T12:09:39.482+02:00 | raise error_class(parsed_response, operation_name)
  | 2021-09-24T12:09:39.482+02:00Copybotocore.exceptions.ClientError: An error occurred (ValidationError) when calling the AssumeRole operation: 1 validation error detected: Value 'principal-updater-v2-consoleme_admin@consoleme-dev.consoleme.lab.xxx.xx' at 'roleSessionName' failed to satisfy constraint: Member must have length less than or equal to 64 | botocore.exceptions.ClientError: An error occurred (ValidationError) when calling the AssumeRole operation: 1 validation error detected: Value 'principal-updater-v2-consoleme_admin@consoleme-dev.consoleme.lab.xxx.xx at 'roleSessionName' failed to satisfy constraint: Member must have length less than or equal to 64
  | 2021-09-24T12:09:39.482+02:00Copy2021-09-24 10:09:39,482 - ERROR - tornado.access - [web.py:2239 - log_request() ] - 500 PUT /api/v2/requests/b4d36699-ac14-44ea-a08e-2d9316472c01 (10.0.21.89) 3161.34ms | 2021-09-24 10:09:39,482 - ERROR - tornado.access - [web.py:2239 - log_request() ] - 500 PUT /api/v2/requests/b4d36699-ac14-44ea-a08e-2d9316472c01 (10.0.21.89) 3161.34ms

`
It seems like my host-name in combination with the default admin is to long.

To Reproduce
Steps to reproduce the behavior:

  1. Have a long domain / host-name?
  2. Create a Self Service Request
  3. Try to approve
  4. See error

Expected behavior
to work

Additional context
Add any other context about the problem here.

@Rayv1
Copy link
Author

Rayv1 commented Sep 24, 2021

duplicate of 9156

@Rayv1 Rayv1 closed this as completed Sep 24, 2021
@castrapel
Copy link
Contributor

PR submitted: #9254

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

No branches or pull requests

2 participants