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

question: getting transformer for \"ui\" erred: ui config too short #180

Closed
ahmedwonolo opened this issue Nov 1, 2022 · 5 comments
Closed
Assignees
Labels
need triage question Further information is requested

Comments

@ahmedwonolo
Copy link

ahmedwonolo commented Nov 1, 2022

First of all, this is cool and awesome project!

I'm getting issue when adding ui block to the Caddyfile.

error

{"level":"debug","ts":1667334401.5576553,"logger":"security","msg":"Configuring caching","portal_name":"authz_proxy_portal","portal_id":"390917c0-93d1-4bf8-87e9-be48c2c58caf"}
{"level":"debug","ts":1667334401.5577338,"logger":"security","msg":"Configuring cookie parameters","portal_name":"authz_proxy_portal"}
{"level":"debug","ts":1667334401.5577636,"logger":"security","msg":"Configuring authentication ACL","portal_name":"authz_proxy_portal","portal_id":"390917c0-93d1-4bf8-87e9-be48c2c58caf","access_list_configs":[{"conditions":["match roles authp/admin authp/user authp/guest superuser superadmin"],"action":"allow stop"}]}
{"level":"debug","ts":1667334401.5580149,"logger":"security","msg":"Configured validator ACL","portal_name":"authz_proxy_portal","portal_id":"390917c0-93d1-4bf8-87e9-be48c2c58caf","token_validator_options":{"validate_bearer_header":true},"token_grantor_options":{}}
{"level":"debug","ts":1667334401.5580657,"logger":"security","msg":"Configuring identity provider login options","portal_name":"authz_proxy_portal","portal_id":"390917c0-93d1-4bf8-87e9-be48c2c58caf","identity_provider_count":1}
{"level":"debug","ts":1667334401.5581868,"logger":"security","msg":"Provisioned login options","portal_name":"authz_proxy_portal","portal_id":"390917c0-93d1-4bf8-87e9-be48c2c58caf","options":{"authenticators":[{"background_color":"#e53935","class_name":"lab la-google la-2x","color":"white","endpoint":"oauth2/google","realm":"google","text":"Google","text_color":"#37474f"}],"authenticators_required":"yes","default_realm":"google","form_required":"no","hide_contact_support_link":"yes","hide_forgot_username_link":"yes","hide_links":"yes","hide_register_link":"yes","identity_required":"no","realm_dropdown_required":"no"},"identity_store_count":0,"identity_provider_count":1}
{"level":"debug","ts":1667334401.5583332,"logger":"security","msg":"Configuring user interface","portal_name":"authz_proxy_portal","portal_id":"390917c0-93d1-4bf8-87e9-be48c2c58caf"}
{"level":"debug","ts":1667334401.5583467,"logger":"security","msg":"Configuring default authentication user interface templates","portal_name":"authz_proxy_portal","template_theme":"basic","template_name":"sandbox"}
{"level":"debug","ts":1667334401.5615797,"logger":"security","msg":"Configuring default authentication user interface templates","portal_name":"authz_proxy_portal","template_theme":"basic","template_name":"apps_mobile_access"}
{"level":"debug","ts":1667334401.561888,"logger":"security","msg":"Configuring default authentication user interface templates","portal_name":"authz_proxy_portal","template_theme":"basic","template_name":"login"}
{"level":"debug","ts":1667334401.5627902,"logger":"security","msg":"Configuring default authentication user interface templates","portal_name":"authz_proxy_portal","template_theme":"basic","template_name":"portal"}
{"level":"debug","ts":1667334401.5640821,"logger":"security","msg":"Configuring default authentication user interface templates","portal_name":"authz_proxy_portal","template_theme":"basic","template_name":"whoami"}
{"level":"debug","ts":1667334401.564497,"logger":"security","msg":"Configuring default authentication user interface templates","portal_name":"authz_proxy_portal","template_theme":"basic","template_name":"register"}
{"level":"debug","ts":1667334401.5658348,"logger":"security","msg":"Configuring default authentication user interface templates","portal_name":"authz_proxy_portal","template_theme":"basic","template_name":"settings"}
{"level":"debug","ts":1667334401.5700994,"logger":"security","msg":"Configuring default authentication user interface templates","portal_name":"authz_proxy_portal","template_theme":"basic","template_name":"generic"}
{"level":"debug","ts":1667334401.5704162,"logger":"security","msg":"Configuring default authentication user interface templates","portal_name":"authz_proxy_portal","template_theme":"basic","template_name":"apps_sso"}
{"level":"debug","ts":1667334401.5712647,"logger":"security","msg":"Configured user interface","portal_name":"authz_proxy_portal","portal_id":"390917c0-93d1-4bf8-87e9-be48c2c58caf","title":"Sign In","logo_url":"/assets/images/logo.svg","logo_description":"Authentication Portal","action_endpoint":"","private_links":[],"realms":[],"theme":"basic"}
{"level":"debug","ts":1667334401.571305,"logger":"security","msg":"Configuring user transforms","portal_name":"authz_proxy_portal","portal_id":"390917c0-93d1-4bf8-87e9-be48c2c58caf"}
{"level":"error","ts":1667334401.5713289,"logger":"security","msg":"failed provisioning app server instance","app":"security","error":"transformer for \"ui\" erred: ui config too short"}

Config snippet

            authentication portal authz_proxy_portal {
              crypto default token lifetime 3600
              crypto key sign-verify {env.JWT_SHARED_KEY}
              enable identity provider google
              cookie domain example.com
              cookie lifetime 86400
              transform user {
                match realm google
                suffix match email @example.com
                action add role authp/user
                ui {
                        links {
                                "My Website" "/app" icon "las la-star"
                                "My Identity" "/auth/whoami" icon "las la-user"
                        }
                }
              }
            }
@ahmedwonolo ahmedwonolo added need triage question Further information is requested labels Nov 1, 2022
@ahmedwonolo
Copy link
Author

also using version 1.1.15

@greenpau
Copy link
Owner

greenpau commented Nov 1, 2022

@ahmedwonolo , the issue is that you put ui inside transform. It should be at the same level.

              transform user {
                ...
                ui {
                        links {
                                "My Website" "/app" icon "las la-star"
                                "My Identity" "/auth/whoami" icon "las la-user"
                        }
                }
              }

Please see config example here: https://github.com/authp/authp.github.io/tree/main/assets/conf

Here is a good one to review too: #179 (comment)

@greenpau
Copy link
Owner

greenpau commented Nov 1, 2022

First of all, this is cool and awesome project!

@ahmedwonolo , thank you! Please promote and consider sponsoring the project 😄

@ahmedwonolo
Copy link
Author

I see. thank you!

I think I mistakenly assumed that I can use ui.links under transform where I wanted to have multiple links under transform.

https://github.com/authp/authp.github.io/blob/main/assets/conf/oauth/authproxy/Caddyfile#L14

@greenpau
Copy link
Owner

greenpau commented Nov 1, 2022

@ahmedwonolo , in the transform you could add the one by one. In the portal itself, you add an entire block

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need triage question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants