dani-garcia / vaultwarden

Unofficial Bitwarden compatible server written in Rust, formerly known as bitwarden_rs
GNU Affero General Public License v3.0
37.35k stars 1.82k forks source link

organization does not show #4510

Closed IamTaoChen closed 5 months ago

IamTaoChen commented 5 months ago

Subject of the issue

Deployment environment

Steps to reproduce

the "Organizations" doesn't show when the login.

image

if refresh and re-login, the "Organizations" appears.

image

Expected behaviour

Actual behaviour

Troubleshooting data

BlackDex commented 5 months ago

We need more details. Did you created the org or are you invited. What are the log messages etc...

IamTaoChen commented 5 months ago

yes, I created the org.

This is the console log, I think it doesn't matter

image

Here is the server log:

vaultwarden  | [2024-04-17 23:05:15.528][start][INFO] Rocket has launched from http://0.0.0.0:80
vaultwarden  | [2024-04-17 23:05:36.494][request][INFO] GET /
vaultwarden  | [2024-04-17 23:05:36.494][response][INFO] (web_index) GET / => 200 OK
vaultwarden  | [2024-04-17 23:05:36.545][request][INFO] GET /app/main.bfda25c788b32075b928.css
vaultwarden  | [2024-04-17 23:05:36.545][response][INFO] (web_files) GET /<p..> [10] => 200 OK
vaultwarden  | [2024-04-17 23:05:36.546][request][INFO] GET /theme_head.1df11f603fda400762b7.js
vaultwarden  | [2024-04-17 23:05:36.546][response][INFO] (web_files) GET /<p..> [10] => 200 OK
vaultwarden  | [2024-04-17 23:05:36.553][request][INFO] GET /app/polyfills.553f1c6e04a4256f1a4c.js
vaultwarden  | [2024-04-17 23:05:36.553][response][INFO] (web_files) GET /<p..> [10] => 200 OK
vaultwarden  | [2024-04-17 23:05:36.595][request][INFO] GET /app/vendor.58a71e94f36c45876e9f.js
vaultwarden  | [2024-04-17 23:05:36.595][response][INFO] (web_files) GET /<p..> [10] => 200 OK
vaultwarden  | [2024-04-17 23:05:36.627][request][INFO] GET /app/main.a8f027a034b348c3f19d.js
vaultwarden  | [2024-04-17 23:05:36.627][response][INFO] (web_files) GET /<p..> [10] => 200 OK
vaultwarden  | [2024-04-17 23:05:36.985][request][INFO] GET /locales/en/messages.json?cache=mw0sn
vaultwarden  | [2024-04-17 23:05:36.985][request][INFO] GET /images/logo-dark@2x.png
vaultwarden  | [2024-04-17 23:05:36.985][response][INFO] (web_files) GET /<p..> [10] => 200 OK
vaultwarden  | [2024-04-17 23:05:36.985][response][INFO] (web_files) GET /<p..> [10] => 200 OK
vaultwarden  | [2024-04-17 23:05:36.993][request][INFO] GET /fonts/bwi-font.f7a43f81d823e54532d4.ttf
vaultwarden  | [2024-04-17 23:05:36.993][response][INFO] (web_files) GET /<p..> [10] => 200 OK
vaultwarden  | [2024-04-17 23:05:37.061][request][INFO] GET /api/config
vaultwarden  | [2024-04-17 23:05:37.061][response][INFO] (config) GET /api/config => 200 OK
vaultwarden  | [2024-04-17 23:05:37.105][request][INFO] GET /fonts/Open_Sans-normal-600.7f2861051b34a8ecd9f2.woff
vaultwarden  | [2024-04-17 23:05:37.105][request][INFO] GET /fonts/Open_Sans-normal-400.8465030b62273715c99d.woff
vaultwarden  | [2024-04-17 23:05:37.105][response][INFO] (web_files) GET /<p..> [10] => 200 OK
vaultwarden  | [2024-04-17 23:05:37.105][response][INFO] (web_files) GET /<p..> [10] => 200 OK
vaultwarden  | [2024-04-17 23:05:37.167][request][INFO] GET /images/favicon-32x32.png
vaultwarden  | [2024-04-17 23:05:37.167][response][INFO] (web_files) GET /<p..> [10] => 200 OK
vaultwarden  | [2024-04-17 23:05:40.165][request][INFO] GET /api/devices/knowndevice
vaultwarden  | [2024-04-17 23:05:40.165][response][INFO] (get_known_device) GET /api/devices/knowndevice => 200 OK
vaultwarden  | [2024-04-17 23:05:41.177][request][INFO] POST /identity/accounts/prelogin
vaultwarden  | [2024-04-17 23:05:41.177][response][INFO] (prelogin) POST /identity/accounts/prelogin => 200 OK
vaultwarden  | [2024-04-17 23:05:41.273][request][INFO] POST /identity/connect/token
vaultwarden  | [2024-04-17 23:05:41.382][error][ERROR] 2FA token not provided
vaultwarden  | [2024-04-17 23:05:41.382][response][INFO] (login) POST /identity/connect/token => 400 Bad Request
vaultwarden  | [2024-04-17 23:05:41.947][request][INFO] GET /webauthn-connector.html?data=eyJhbGxvd0NyZWRlbnRpYWxzI
vaultwarden  | [2024-04-17 23:05:41.947][response][INFO] (web_files) GET /<p..> [10] => 200 OK
vaultwarden  | [2024-04-17 23:05:42.005][request][INFO] GET /connectors/webauthn.faa61e07e657df90b572.css
vaultwarden  | [2024-04-17 23:05:42.005][request][INFO] GET /images/u2fkey.avif
vaultwarden  | [2024-04-17 23:05:42.005][response][INFO] (web_files) GET /<p..> [10] => 200 OK
vaultwarden  | [2024-04-17 23:05:42.006][response][INFO] (web_files) GET /<p..> [10] => 200 OK
vaultwarden  | [2024-04-17 23:05:42.006][request][INFO] GET /connectors/webauthn.b50e3a9527b3e4de41eb.js
vaultwarden  | [2024-04-17 23:05:42.006][response][INFO] (web_files) GET /<p..> [10] => 200 OK
vaultwarden  | [2024-04-17 23:05:45.524][vaultwarden::api::core::two_factor][DEBUG] Sending notifications for incomplete 2FA logins
vaultwarden  | [2024-04-17 23:05:45.525][vaultwarden::api::core::accounts][DEBUG] Purging auth requests
vaultwarden  | [2024-04-17 23:06:01.048][request][INFO] POST /identity/connect/token
vaultwarden  | [2024-04-17 23:06:01.153][webauthn_rs::core][DEBUG] no extensions
vaultwarden  | [2024-04-17 23:06:01.156][vaultwarden::api::identity][INFO] User {USEANME} logged in successfully. IP: 178.197.218.95
vaultwarden  | [2024-04-17 23:06:01.156][response][INFO] (login) POST /identity/connect/token => 200 OK
vaultwarden  | [2024-04-17 23:06:01.257][request][INFO] GET /images/icon-white.png
vaultwarden  | [2024-04-17 23:06:01.257][response][INFO] (web_files) GET /<p..> [10] => 200 OK
vaultwarden  | [2024-04-17 23:06:01.265][request][INFO] GET /images/close-button.svg
vaultwarden  | [2024-04-17 23:06:01.265][response][INFO] (web_files) GET /<p..> [10] => 200 OK
vaultwarden  | [2024-04-17 23:06:01.297][request][INFO] GET /fonts/Open_Sans-normal-700.a39de6b1b80c7f21cf88.woff
vaultwarden  | [2024-04-17 23:06:01.297][response][INFO] (web_files) GET /<p..> [10] => 200 OK
vaultwarden  | [2024-04-17 23:06:15.565][request][INFO] GET /alive
vaultwarden  | [2024-04-17 23:06:15.566][response][INFO] (alive) GET /alive => 200 OK

Until now, the 'org' doesn't show. Then I refresh. No error shows in the console and the server log:

vaultwarden  | [2024-04-17 23:08:19.938][request][INFO] GET /icons/XXXXX/icon.png
vaultwarden  | [2024-04-17 23:08:19.938][request][INFO] GET /icons/XXXXX/icon.png
vaultwarden  | [2024-04-17 23:08:19.938][response][INFO] (icon_internal) GET /icons/<domain>/icon.png => 200 OK
vaultwarden  | [2024-04-17 23:08:19.938][response][INFO] (icon_internal) GET /icons/<domain>/icon.png => 200 OK
vaultwarden  | [2024-04-17 23:08:19.939][response][INFO] (icon_internal) GET /icons/<domain>/icon.png => 200 OK
vaultwarden  | [2024-04-17 23:08:19.939][request][INFO] GET /icons/XXXXXX/icon.png
vaultwarden  | [2024-04-17 23:08:19.939][request][INFO] GET /icons/XXXXX/icon.png
vaultwarden  | [2024-04-17 23:08:19.939][request][INFO] GET /icons/passport.jlcpcb.com/icon.png
vaultwarden  | [2024-04-17 23:08:19.940][response][INFO] (icon_internal) GET /icons/<domain>/icon.png => 200 OK
vaultwarden  | [2024-04-17 23:08:19.940][response][INFO] (icon_internal) GET /icons/<domain>/icon.png => 200 OK
vaultwarden  | [2024-04-17 23:08:19.941][response][INFO] (icon_internal) GET /icons/<domain>/icon.png => 200 OK
vaultwarden  | [2024-04-17 23:08:19.941][response][INFO] (icon_internal) GET /icons/<domain>/icon.png => 200 OK
vaultwarden  | [2024-04-17 23:08:20.034][request][INFO] GET /notifications/hub?access_token=eyJ0eXAiOiJKV1QiL
vaultwarden  | [2024-04-17 23:08:20.034][vaultwarden::api::notifications][INFO] Accepting Rocket WS connection from 178.197.218.95
vaultwarden  | [2024-04-17 23:08:20.034][response][INFO] (websockets_hub) GET /notifications/hub?<data..> => 200 OK
BlackDex commented 5 months ago

I'm seeing calls to bitwarden instead of your self hosted environment. I also do not see the creation of an org in the logs (might overlook it).

Not sure how those calls go to bitwarden when using our containers.

BlackDex commented 5 months ago

Could you post the diagnostics support string please btw

IamTaoChen commented 5 months ago

Sorry, I don't know what's the diagnostics support string and how to get it.

BlackDex commented 5 months ago

Sorry, I don't know what's the diagnostics support string and how to get it.

You can do that by going to /admin/diagnostics

IamTaoChen commented 5 months ago

Your environment (Generated via diagnostics page)

Config (Generated via diagnostics page)

Show Running Config **Environment settings which are overridden:** ```json { "_duo_akey": null, "_enable_duo": true, "_enable_email_2fa": false, "_enable_smtp": true, "_enable_yubico": true, "_icon_service_csp": "", "_icon_service_url": "", "_ip_header_enabled": true, "_smtp_img_src": "cid:", "admin_ratelimit_max_burst": 3, "admin_ratelimit_seconds": 300, "admin_session_lifetime": 20, "admin_token": "***", "allowed_iframe_ancestors": "*****://*************", "attachments_folder": "data/attachments", "auth_request_purge_schedule": "30 * * * * *", "authenticator_disable_time_drift": false, "data_folder": "data", "database_conn_init": "", "database_max_conns": 10, "database_timeout": 30, "database_url": "***************", "db_connection_retries": 15, "disable_2fa_remember": false, "disable_admin_token": false, "disable_icon_download": false, "domain": "*****://**************", "domain_origin": "*****://**************", "domain_path": "", "domain_set": true, "duo_host": null, "duo_ikey": null, "duo_skey": null, "email_attempts_limit": 3, "email_change_allowed": false, "email_expiration_time": 600, "email_token_size": 6, "emergency_access_allowed": true, "emergency_notification_reminder_schedule": "0 3 * * * *", "emergency_request_timeout_schedule": "0 7 * * * *", "enable_db_wal": true, "event_cleanup_schedule": "0 10 0 * * *", "events_days_retain": null, "experimental_client_feature_flags": "fido2-vault-credentials", "extended_logging": true, "helo_name": null, "hibp_api_key": null, "icon_blacklist_non_global_ips": true, "icon_blacklist_regex": null, "icon_cache_folder": "data/icon_cache", "icon_cache_negttl": 259200, "icon_cache_ttl": 2592000, "icon_download_timeout": 10, "icon_redirect_code": 302, "icon_service": "internal", "incomplete_2fa_schedule": "30 * * * * *", "incomplete_2fa_time_limit": 3, "invitation_expiration_hours": 120, "invitation_org_name": "EQE", "invitations_allowed": true, "ip_header": "X-Real-IP", "job_poll_interval_ms": 30000, "log_file": null, "log_level": "debug", "log_timestamp_format": "%Y-%m-%d %H:%M:%S.%3f", "login_ratelimit_max_burst": 10, "login_ratelimit_seconds": 60, "org_attachment_limit": null, "org_creation_users": "", "org_events_enabled": false, "org_groups_enabled": true, "password_hints_allowed": true, "password_iterations": 600000, "push_enabled": true, "push_identity_uri": "https://identity.bitwarden.eu", "push_installation_id": "***", "push_installation_key": "***", "push_relay_uri": "https://push.bitwarden.eu", "reload_templates": false, "require_device_email": false, "rsa_key_filename": "data/rsa_key", "send_purge_schedule": "0 5 * * * *", "sendmail_command": null, "sends_allowed": true, "sends_folder": "data/sends", "show_password_hint": false, "signups_allowed": false, "signups_domains_whitelist": "", "signups_verify": false, "signups_verify_resend_limit": 6, "signups_verify_resend_time": 3600, "smtp_accept_invalid_certs": false, "smtp_accept_invalid_hostnames": false, "smtp_auth_mechanism": null, "smtp_debug": false, "smtp_embed_images": true, "smtp_explicit_tls": null, "smtp_from": "", "smtp_from_name": "Vaultwarden", "smtp_host": null, "smtp_password": null, "smtp_port": 587, "smtp_security": "starttls", "smtp_ssl": null, "smtp_timeout": 15, "smtp_username": null, "templates_folder": "data/templates", "tmp_folder": "data/tmp", "trash_auto_delete_days": null, "trash_purge_schedule": "0 5 0 * * *", "use_sendmail": false, "use_syslog": false, "user_attachment_limit": null, "user_send_limit": null, "web_vault_enabled": true, "web_vault_folder": "web-vault/", "websocket_address": "0.0.0.0", "websocket_enabled": false, "websocket_port": 3012, "yubico_client_id": null, "yubico_secret_key": null, "yubico_server": null } ```
BlackDex commented 5 months ago

Ok, and what do you see in /admin/organizations/overview?

IamTaoChen commented 5 months ago
image
BlackDex commented 5 months ago

And if you check your user, is that user still part of that org?

IamTaoChen commented 5 months ago

Yes, they are. Just refresh the page(input the master password to unlock), the org will appear.

Maybe I make you confused.

  1. Every time the user open and login the vault-web, there is nothing.

    image
  2. refresh the page, the web ask to input master password to unlock

    image
  3. The the ORG show. (this is a normal user)

    image
BlackDex commented 5 months ago

Please try the testing tagged docker image and see of that solves the issue. Might be a web-vault buggy

IamTaoChen commented 5 months ago

with testing label, no this problem.

BlackDex commented 5 months ago

Then it's a web-vault bug and thus resolved in a newer version. Going to close this.