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

fix(jans-cli-tui): tui breaking after device authentication #6082

Closed
manojs1978 opened this issue Sep 18, 2023 · 2 comments
Closed

fix(jans-cli-tui): tui breaking after device authentication #6082

manojs1978 opened this issue Sep 18, 2023 · 2 comments
Assignees
Labels
comp-jans-cli-tui Component affected by issue or PR kind-bug Issue or PR is a bug in existing functionality

Comments

@manojs1978
Copy link
Contributor

Describe the bug
tui breaking after device authentication

To Reproduce
Steps to reproduce the behavior:

  1. install jans 1.0.17 package
  2. launch cui
  3. complete device auth in chrome
  4. click ok button on tui
  5. See error
Unhandled exception in event loop:
  File "/opt/jans/jans-cli/config-cli-tui.py", line 408, in coroutine
    self.check_available_plugins()
  File "/opt/jans/jans-cli/config-cli-tui.py", line 433, in check_available_plugins
    self.init_plugins()
  File "/opt/jans/jans-cli/config-cli-tui.py", line 265, in init_plugins
    plugin.init_plugin()
  File "/opt/jans/jans-cli/plugins/010_auth_server/main.py", line 87, in init_plugin
    self.ssa.init_cli_object()
  File "/opt/jans/jans-cli/plugins/010_auth_server/ssa.py", line 63, in init_cli_object
    op_mode = 'auth'
  File "/opt/jans/jans-cli/cli/config_cli.py", line 277, in __init__
    read_swagger(self.my_op_mode)
  File "/opt/jans/jans-cli/cli/config_cli.py", line 130, in read_swagger
    config_ = ruamel.yaml.load(f.read().replace('\t', ''), ruamel.yaml.RoundTripLoader)
  File "/usr/lib/python3.6/site-packages/ruamel/yaml/main.py", line 951, in load
    return loader._constructor.get_single_data()
  File "/usr/lib/python3.6/site-packages/ruamel/yaml/constructor.py", line 111, in get_single_data
    node = self.composer.get_single_node()
  File "/usr/lib/python3.6/site-packages/ruamel/yaml/composer.py", line 78, in get_single_node
    document = self.compose_document()
  File "/usr/lib/python3.6/site-packages/ruamel/yaml/composer.py", line 101, in compose_document
    node = self.compose_node(None, None)
  File "/usr/lib/python3.6/site-packages/ruamel/yaml/composer.py", line 138, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/lib/python3.6/site-packages/ruamel/yaml/composer.py", line 218, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "/usr/lib/python3.6/site-packages/ruamel/yaml/composer.py", line 138, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/lib/python3.6/site-packages/ruamel/yaml/composer.py", line 218, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "/usr/lib/python3.6/site-packages/ruamel/yaml/composer.py", line 138, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/lib/python3.6/site-packages/ruamel/yaml/composer.py", line 218, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "/usr/lib/python3.6/site-packages/ruamel/yaml/composer.py", line 138, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/lib/python3.6/site-packages/ruamel/yaml/composer.py", line 218, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "/usr/lib/python3.6/site-packages/ruamel/yaml/composer.py", line 136, in compose_node
    node = self.compose_sequence_node(anchor)
  File "/usr/lib/python3.6/site-packages/ruamel/yaml/composer.py", line 180, in compose_sequence_node
    node.value.append(self.compose_node(node, index))
  File "/usr/lib/python3.6/site-packages/ruamel/yaml/composer.py", line 138, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/lib/python3.6/site-packages/ruamel/yaml/composer.py", line 218, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "/usr/lib/python3.6/site-packages/ruamel/yaml/composer.py", line 111, in compose_node
    if self.parser.check_event(AliasEvent):
  File "/usr/lib/python3.6/site-packages/ruamel/yaml/parser.py", line 140, in check_event
    self.current_event = self.state()
  File "/usr/lib/python3.6/site-packages/ruamel/yaml/parser.py", line 603, in parse_block_mapping_value
    if self.scanner.check_token(ValueToken):
  File "/usr/lib/python3.6/site-packages/ruamel/yaml/scanner.py", line 1764, in check_token
    self._gather_comments()
  File "/usr/lib/python3.6/site-packages/ruamel/yaml/scanner.py", line 1806, in _gather_comments
    self.fetch_more_tokens()
  File "/usr/lib/python3.6/site-packages/ruamel/yaml/scanner.py", line 283, in fetch_more_tokens
    return self.fetch_value()
  File "/usr/lib/python3.6/site-packages/ruamel/yaml/scanner.py", line 656, in fetch_value
    self.reader.get_mark(),

Exception mapping values are not allowed here
  in "<unicode string>", line 2528, column 24:
                description: Client Id. It can be useful to ... 
                           ^ (line: 2528)

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):

  • OS: suse
  • Browser [e.g. chrome, safari]
  • Version 15 sp4
  • jans 1.0.17
  • DB opendj

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

launch-2023-09-18_19.08.42.mp4
@mo-auto mo-auto added comp-jans-cli-tui Component affected by issue or PR kind-bug Issue or PR is a bug in existing functionality labels Sep 18, 2023
@devrimyatar
Copy link
Contributor

This is not TUI issue, auth servers swagger file is malformed. @yuriyz Please see

image

@yuriyz
Copy link
Contributor

yuriyz commented Sep 19, 2023

Fixed in PR #6086

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-jans-cli-tui Component affected by issue or PR kind-bug Issue or PR is a bug in existing functionality
Projects
None yet
Development

No branches or pull requests

5 participants