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

Token cleanup process improvements (bsc#1213376) #7415

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

rjmateus
Copy link
Member

What does this PR change?

backport of:

Delete invalid tokens in token cleanup process (bsc#1211874)

Customers with a high number of session tokens which is taking a long time to be able to process the channel authentication.

These PR sets add more data clean-up when to de-associate the token from the minion.

If the token is expired or if the token is invalid and not associated with any minion we can delete it.
Besides that, I move the delete part from java processing to one single SQL statement. This makes the process cleaner and much faster.

It also improves the mechanism of propagates the new token generation by making a salt async call instead of schinchronized.

Also add a validation that the token needs to exist in the database, otherwise is considered invalid.

GUI diff

No difference.

  • DONE

Documentation

  • No documentation needed: internal process optimization

  • DONE

Test coverage

  • Unit tests updated and improved.

  • DONE

Links

Backport: https://github.com/SUSE/spacewalk/pull/21874

  • DONE

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Re-run a test

If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:

  • Re-run test "changelog_test"
  • Re-run test "backend_unittests_pgsql"
  • Re-run test "java_pgsql_tests"
  • Re-run test "schema_migration_test_pgsql"
  • Re-run test "susemanager_unittests"
  • Re-run test "javascript_lint"
  • Re-run test "spacecmd_unittests"

@github-actions
Copy link
Contributor

github-actions bot commented Aug 14, 2023

Suggested tests to cover this Pull Request
  • minssh_salt_install_package
  • min_deblike_monitoring
  • min_salt_mgrcompat_state
  • proxy_cobbler_pxeboot
  • allcli_software_channels_dependencies
  • allcli_system_group
  • minkvm_guests
  • srv_rename_hostname
  • srv_docker_cve_audit
  • srv_cobbler_profile
  • srv_restart
  • min_ansible_control_node
  • srv_reportdb
  • min_retracted_patches
  • min_bootstrap_negative
  • min_activationkey
  • allcli_reboot
  • min_bootstrap_ssh_key
  • srv_manage_activationkey
  • min_rhlike_salt
  • min_salt_formulas_advanced
  • srv_manage_channels_page
  • min_deblike_salt_install_package
  • buildhost_docker_build_image
  • min_recurring_action
  • proxy_as_pod_basic_tests
  • minssh_bootstrap_api
  • srv_advanced_search
  • min_salt_minion_details
  • min_salt_lock_packages
  • srv_scc_user_credentials
  • min_deblike_openscap_audit
  • min_rhlike_ssh
  • min_check_patches_install
  • min_virthost
  • min_salt_openscap_audit
  • min_salt_install_with_staging
  • min_move_from_and_to_proxy
  • allcli_config_channel
  • min_project_lotus
  • min_salt_software_states
  • min_timezone
  • min_bootstrap_api
  • min_bootstrap_reactivation
  • min_rhlike_monitoring
  • min_salt_user_states
  • minssh_ansible_control_node
  • min_rhlike_salt_install_package_and_patch
  • min_config_state_channel_api
  • min_deblike_salt
  • buildhost_osimage_build_image
  • srv_monitoring
  • min_deblike_salt_install_with_staging
  • min_cve_audit
  • min_rhlike_remote_command
  • allcli_action_chain
  • min_salt_pkgset_beacon
  • proxy_retail_pxeboot_and_mass_import
  • buildhost_bootstrap
  • proxy_branch_network
  • min_rhlike_openscap_audit
  • min_bootstrap_script
  • min_cve_id_new_syntax
  • allcli_sanity
  • min_deblike_ssh
  • min_salt_install_package
  • min_salt_minions_page
  • min_monitoring
  • min_change_software_channel
  • min_action_chain
  • min_deblike_remote_command
  • minssh_action_chain
  • sle_ssh_minion
  • min_salt_formulas
  • allcli_overview_systems_details
  • min_custom_pkg_download_endpoint
  • allcli_software_channels
  • srv_maintenance_windows
  • sle_minion
  • min_ssh_tunnel
  • minssh_move_from_and_to_proxy
  • buildhost_docker_auth_registry
  • proxy_register_as_minion_with_script
  • srv_salt_download_endpoint
  • srv_power_management
  • srv_sync_channels
  • srv_content_lifecycle
  • srv_task_status_engine
  • srv_patches_page
  • srv_logfile
  • srv_enable_sync_products
  • srv_create_repository
  • min_empty_system_profiles
  • srv_add_rocky8_repositories
  • srv_organization_credentials
  • srv_custom_system_info
  • srv_cobbler_distro
  • allcli_update_activationkeys
  • srv_datepicker
  • srv_change_password
  • srv_user_preferences
  • srv_cobbler_sync
  • srv_channels_add
  • srv_distro_cobbler
  • srv_group_union_intersection
  • srv_virtual_host_manager
  • srv_check_channels_page
  • srv_dist_channel_mapping
  • min_config_state_channel
  • srv_change_task_schedule
  • srv_delete_channel_with_tool
  • srv_notifications
  • srv_wait_for_reposync
  • srv_salt
  • srv_cobbler_buildiso
  • srv_users
  • srv_push_package
  • min_docker_api
  • srv_check_sync_source_packages
  • srv_handle_config_channels_with_ISS_v2
  • srv_delete_channel_from_ui
  • srv_power_management_redfish
  • srv_user_configuration_salt_states
  • srv_clone_channel_npn
  • srv_handle_software_channels_with_ISS_v2
  • srv_mainpage
  • min_salt_migration
  • srv_check_reposync
  • srv_power_management_api
  • min_config_state_channel_subscriptions
  • srv_payg_ssh_connection
  • srv_activationkey_api
  • srv_channel_api
  • srv_docker_advanced_content_management
  • srv_menu
  • srv_osimage
  • srv_first_settings
  • srv_create_activationkey
  • srv_disable_local_repos_off
  • srv_user_api

@rjmateus rjmateus changed the title Delete invalid tokens in token cleanup process (bsc#1211874) Delete invalid tokens in token cleanup process (bsc#1213376) Aug 14, 2023
@rjmateus rjmateus changed the title Delete invalid tokens in token cleanup process (bsc#1213376) Token cleanup process improvements (bsc#1213376) Aug 14, 2023
Signed-off-by: Ricardo Mateus <rmateus@suse.com>
@rjmateus rjmateus merged commit 7d5f49b into uyuni-project:master Oct 6, 2023
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant