diff --git a/documentation/revision-history-develop.md b/documentation/revision-history-develop.md index e965c6c2fa..bed3940c06 100644 --- a/documentation/revision-history-develop.md +++ b/documentation/revision-history-develop.md @@ -300,4 +300,7 @@ bugfix release: # 8.9.2 - 17.10.2025 DEVELOP - add ownerLifeCycleState -- add manageable ownerLifeCycleState menu \ No newline at end of file +- add manageable ownerLifeCycleState menu + +# 8.9.3 - 05.11.2025 DEVELOP +- hotfix missing permissions for app data import in certain constellations diff --git a/documentation/revision-history-main.md b/documentation/revision-history-main.md index 47790f5e8f..6c7e43c48a 100644 --- a/documentation/revision-history-main.md +++ b/documentation/revision-history-main.md @@ -552,3 +552,13 @@ hotfix release - fixing services-other ip proto import - improved quality control with stricter automated checks - various fixes in modelling module + +# 8.9.1 - 02.10.2025 MAIN +- owner-recertification + +# 8.9.2 - 17.10.2025 MAIN +- add ownerLifeCycleState +- add manageable ownerLifeCycleState menu + +# 8.9.3 - 05.11.2025 MAIN +- hotfix missing permissions for app data import in certain constellations diff --git a/inventory/group_vars/all.yml b/inventory/group_vars/all.yml index 256db00cb6..41f19fad16 100644 --- a/inventory/group_vars/all.yml +++ b/inventory/group_vars/all.yml @@ -1,5 +1,5 @@ ### general settings -product_version: "8.9.2" +product_version: "8.9.3" ansible_user: "{{ lookup('env', 'USER') }}" ansible_become_method: sudo ansible_python_interpreter: /usr/bin/python3 @@ -59,6 +59,7 @@ debian_testing_version: "12" # should actually be 13 but microsoft does not yet provide https://packages.microsoft.com/config/debian/13 debian_testing_release_name: trixie arch: x86_64 +linux_architecture: amd64 redhat_major_version: "8" redhat_arch: "{{ redhat_major_version }}-{{ arch }}" diff --git a/inventory/group_vars/apiserver.yml b/inventory/group_vars/apiserver.yml index 06e15f1601..afff9277d3 100644 --- a/inventory/group_vars/apiserver.yml +++ b/inventory/group_vars/apiserver.yml @@ -8,7 +8,7 @@ api_hasura_admin_test_password: "not4production" api_user_email: "{{ api_user }}@{{ api_network_listening_ip_address }}" api_home: "{{ fworch_home }}/api" api_hasura_cli_bin: "{{ fworch_home }}/api/bin/hasura" -api_hasura_version: "v2.48.5" +api_hasura_version: "v2.48.6" api_project_name: api api_no_metadata: false api_rollback_is_running: false diff --git a/roles/api/files/replace_metadata.json b/roles/api/files/replace_metadata.json index abe5f938b5..079b8edde3 100644 --- a/roles/api/files/replace_metadata.json +++ b/roles/api/files/replace_metadata.json @@ -10033,20 +10033,25 @@ "check": {}, "columns": [ "active", - "app_id_external", "common_service_possible", + "is_default", + "recert_active", + "app_id_external", "criticality", "dn", "group_dn", - "id", "import_source", - "is_default", - "last_recert_check", + "last_recertifier_dn", "name", - "recert_active", "recert_check_params", + "id", + "last_recertifier", + "owner_lifecycle_state_id", "recert_interval", - "tenant_id" + "tenant_id", + "last_recert_check", + "last_recertified", + "next_recert_date" ] }, "comment": "" @@ -10443,20 +10448,25 @@ "permission": { "columns": [ "active", - "app_id_external", "common_service_possible", + "is_default", + "recert_active", + "app_id_external", "criticality", "dn", "group_dn", - "id", "import_source", - "is_default", - "last_recert_check", + "last_recertifier_dn", "name", - "recert_active", "recert_check_params", + "id", + "last_recertifier", + "owner_lifecycle_state_id", "recert_interval", - "tenant_id" + "tenant_id", + "last_recert_check", + "last_recertified", + "next_recert_date" ], "filter": {}, "check": null @@ -26195,4 +26205,4 @@ ] } } -} \ No newline at end of file +} diff --git a/roles/api/tasks/hasura-install.yml b/roles/api/tasks/hasura-install.yml index b32a975a67..7238bf48a4 100644 --- a/roles/api/tasks/hasura-install.yml +++ b/roles/api/tasks/hasura-install.yml @@ -2,84 +2,111 @@ - name: Install packages for python pip3 n virtualenv package: - name: "{{ item }}" - state: present + name: "{{ item }}" + state: present loop: - - python3-pip - - python3-virtualenv - - python3-docker + - python3-pip + - python3-virtualenv + - python3-docker become: true - name: read dbadmin pwd from secrets file slurp: - src: "{{ dbadmin_password_file }}" + src: "{{ dbadmin_password_file }}" register: api_user_password become: true - name: decode dbadmin pwd set_fact: - api_user_password: "{{ api_user_password['content'] | b64decode | trim }}" + api_user_password: "{{ api_user_password['content'] | b64decode | trim }}" - name: read jwt public key from file as JWT secret slurp: - src: "{{ jwt_public_key_file }}" + src: "{{ jwt_public_key_file }}" register: api_hasura_jwt_secret_dict become: true - name: decode key set_fact: - api_hasura_jwt_secret: "{{ api_hasura_jwt_secret_dict['content'] | b64decode }}" + api_hasura_jwt_secret: "{{ api_hasura_jwt_secret_dict['content'] | b64decode }}" - name: make sure {{ fworch_secrets_dir }} exists file: - path: "{{ fworch_secrets_dir }}" - state: directory - mode: "0750" - owner: "{{ fworch_user }}" - group: "{{ postgres_group }}" + path: "{{ fworch_secrets_dir }}" + state: directory + mode: "0750" + owner: "{{ fworch_user }}" + group: "{{ postgres_group }}" become: true - name: set static hasura admin pwd for test purposes only set_fact: - api_hasura_admin_secret: "{{ api_hasura_admin_test_password }}" + api_hasura_admin_secret: "{{ api_hasura_admin_test_password }}" when: testkeys is defined and testkeys|bool - name: set random hasura admin password set_fact: - api_hasura_admin_secret: "{{ randomly_generated_pwd }}" + api_hasura_admin_secret: "{{ randomly_generated_pwd }}" when: testkeys is not defined or not testkeys|bool - name: write hasura admin password to secrets directory copy: - content: "{{ api_hasura_admin_secret }}\n" - dest: "{{ fworch_secrets_dir }}/hasura_admin_pwd" - mode: '0600' - owner: "{{ fworch_user }}" - group: "{{ fworch_group }}" + content: "{{ api_hasura_admin_secret }}\n" + dest: "{{ fworch_secrets_dir }}/hasura_admin_pwd" + mode: "0600" + owner: "{{ fworch_user }}" + group: "{{ fworch_group }}" become: true - name: check for existing hasura cli file stat: - path: "{{ api_hasura_cli_bin }}" + path: "{{ api_hasura_cli_bin }}" register: api_cli_check # only download new version of api cli, when not restoring from backup: -- name: download {{ api_hasura_version }} hasura cli binary +- name: Get Hasura release info from GitHub (authenticated) + uri: + url: "https://api.github.com/repos/hasura/graphql-engine/releases/tags/{{ api_hasura_version }}" + method: GET + headers: + Accept: "application/vnd.github+json" + return_content: true + register: hasura_release + environment: "{{ proxy_env }}" + when: not api_cli_check.stat.exists + +- name: Extract Hasura CLI asset id for {{ linux_architecture }} + set_fact: + hasura_cli_asset_id: >- + {{ + hasura_release.json.assets + | selectattr('name', 'equalto', 'cli-hasura-linux-' ~ linux_architecture) + | map(attribute='id') + | list + | first + }} + when: not api_cli_check.stat.exists + +- name: download {{ api_hasura_version }} hasura cli binary via authenticated GitHub access get_url: - url: "https://github.com/hasura/graphql-engine/releases/download/{{ api_hasura_version }}/cli-hasura-linux-amd64" - dest: "{{ api_hasura_cli_bin }}" - force: true - mode: "0755" - owner: "{{ fworch_user }}" - group: "{{ fworch_group }}" + url: "https://api.github.com/repos/hasura/graphql-engine/releases/assets/{{ hasura_cli_asset_id }}" + dest: "{{ api_hasura_cli_bin }}" + headers: + Accept: "application/octet-stream" + force: true + mode: "0755" + owner: "{{ fworch_user }}" + group: "{{ fworch_group }}" environment: "{{ proxy_env }}" become: true - when: not api_cli_check.stat.exists + when: + - not api_cli_check.stat.exists + - hasura_cli_asset_id is defined - name: initialize hasura cli directory command: "{{ api_hasura_cli_bin }} init {{ product_name }} --skip-update-check --endpoint http://{{ api_local_listening_ip_address }}:{{ api_port }} --admin-secret {{ api_hasura_admin_secret }}" - args: - chdir: "{{ api_home }}" + args: + chdir: "{{ api_home }}" become: true become_user: "{{ fworch_user }}" environment: "{{ proxy_env }}" @@ -87,58 +114,55 @@ - name: set hasura env variable set_fact: - hasura_env: - HASURA_GRAPHQL_DATABASE_URL: "postgres://{{ api_user }}:{{ api_user_password }}@{{ fworch_db_host }}:{{ fworch_db_port }}/{{ fworch_db_name }}" - HASURA_GRAPHQL_ENABLE_CONSOLE: "true" - HASURA_GRAPHQL_ENABLE_TELEMETRY: "false" - HASURA_GRAPHQL_ADMIN_SECRET: "{{ api_hasura_admin_secret }}" - HASURA_GRAPHQL_SERVER_HOST: "127.0.0.1" - HASURA_GRAPHQL_SERVER_PORT: "8080" - HASURA_GRAPHQL_LOG_LEVEL: "{{ api_log_level }}" - HASURA_GRAPHQL_ENABLED_LOG_TYPES: '{{ api_HASURA_GRAPHQL_ENABLED_LOG_TYPES }}' - HASURA_GRAPHQL_CONSOLE_ASSETS_DIR: "/srv/console-assets" - HASURA_GRAPHQL_V1_BOOLEAN_NULL_COLLAPSE: "true" - HASURA_GRAPHQL_CORS_DOMAIN: "*" - HASURA_GRAPHQL_INFER_FUNCTION_PERMISSIONS: "{{ api_HASURA_GRAPHQL_INFER_FUNCTION_PERMISSIONS }}" - HASURA_GRAPHQL_JWT_SECRET: ' - { - "type": "{{ api_hasura_jwt_alg|quote }}", - "key": "{{ api_hasura_jwt_secret | regex_replace(''\n'', ''\\n'') }}", - "claims_namespace_path": "$" - } - ' - HTTP_PROXY: "{{ http_proxy }}" - HTTPS_PROXY: "{{ https_proxy }}" - http_proxy: "{{ http_proxy }}" - https_proxy: "{{ https_proxy }}" - no_proxy: "{{ no_proxy }}" - NO_PROXY: "{{ no_proxy }}" + hasura_env: + HASURA_GRAPHQL_DATABASE_URL: "postgres://{{ api_user }}:{{ api_user_password }}@{{ fworch_db_host }}:{{ fworch_db_port }}/{{ fworch_db_name }}" + HASURA_GRAPHQL_ENABLE_CONSOLE: "true" + HASURA_GRAPHQL_ENABLE_TELEMETRY: "false" + HASURA_GRAPHQL_ADMIN_SECRET: "{{ api_hasura_admin_secret }}" + HASURA_GRAPHQL_SERVER_HOST: "127.0.0.1" + HASURA_GRAPHQL_SERVER_PORT: "8080" + HASURA_GRAPHQL_LOG_LEVEL: "{{ api_log_level }}" + HASURA_GRAPHQL_ENABLED_LOG_TYPES: "{{ api_HASURA_GRAPHQL_ENABLED_LOG_TYPES }}" + HASURA_GRAPHQL_CONSOLE_ASSETS_DIR: "/srv/console-assets" + HASURA_GRAPHQL_V1_BOOLEAN_NULL_COLLAPSE: "true" + HASURA_GRAPHQL_CORS_DOMAIN: "*" + HASURA_GRAPHQL_INFER_FUNCTION_PERMISSIONS: "{{ api_HASURA_GRAPHQL_INFER_FUNCTION_PERMISSIONS }}" + HASURA_GRAPHQL_JWT_SECRET: ' + { + "type": "{{ api_hasura_jwt_alg|quote }}", + "key": "{{ api_hasura_jwt_secret | regex_replace(''\n'', ''\\n'') }}", + "claims_namespace_path": "$" + } + ' + HTTP_PROXY: "{{ http_proxy }}" + HTTPS_PROXY: "{{ https_proxy }}" + http_proxy: "{{ http_proxy }}" + https_proxy: "{{ https_proxy }}" + no_proxy: "{{ no_proxy }}" + NO_PROXY: "{{ no_proxy }}" - name: show hasura env for debugging debug: - var: - hasura_env + var: hasura_env when: debug_level > '1' - name: start hasura container docker_container: - name: "{{ api_container_name }}" - image: hasura/graphql-engine:{{ api_hasura_version }} - state: started - network_mode: host - networks_cli_compatible: true - log_driver: syslog - log_options: - syslog-address: "{{ syslog_proto }}://{{ syslog_host }}:{{ syslog_port }}" - syslog-facility: daemon - tag: "{{ api_container_name }}" - recreate: true - exposed_ports: - - "{{ api_port }}:{{ api_port }}" - env: - "{{ hasura_env }}" - container_default_behavior: no_defaults - user: "1001:1001" # hasura user and group id + name: "{{ api_container_name }}" + image: hasura/graphql-engine:{{ api_hasura_version }} + state: started + network_mode: host + networks_cli_compatible: true + log_driver: syslog + log_options: + syslog-address: "{{ syslog_proto }}://{{ syslog_host }}:{{ syslog_port }}" + syslog-facility: daemon + tag: "{{ api_container_name }}" + recreate: true + env: "{{ hasura_env }}" + container_default_behavior: no_defaults + user: "1001:1001" # hasura user and group id + pull: no register: docker_return become: true become_user: "{{ fworch_user }}" @@ -146,65 +170,64 @@ - name: show docker result debug: - var: - docker_return + var: docker_return when: debug_level > '1' - name: Get info on container docker_container_info: - name: "{{ api_container_name }}" + name: "{{ api_container_name }}" register: result become: true become_user: "{{ fworch_user }}" - name: Print the status of the container in case of problems only - fail: - msg: "The container status is: {{ result }}" + fail: + msg: "The container status is: {{ result }}" when: result.exists and result.container['State']['Status'] == 'exited' - name: copy hasura systemd service script template: - src: "{{ api_service_name }}.service.j2" - dest: "/lib/systemd/system/{{ api_service_name }}.service" - backup: true - mode: "0644" - owner: "root" + src: "{{ api_service_name }}.service.j2" + dest: "/lib/systemd/system/{{ api_service_name }}.service" + backup: true + mode: "0644" + owner: "root" become: true - name: make hasura docker container run at host startup systemd: - name: "{{ api_service_name }}" - daemon_reload: true - enabled: true + name: "{{ api_service_name }}" + daemon_reload: true + enabled: true become: true -- name: wait for hasura port to become available +- name: wait for hasura port to become available wait_for: - port: "{{ api_port }}" - host: "{{ api_local_listening_ip_address }}" - connect_timeout: 1 - delay: 10 - timeout: 25 + port: "{{ api_port }}" + host: "{{ api_local_listening_ip_address }}" + connect_timeout: 1 + delay: 10 + timeout: 25 - name: check for existing api dir from restore stat: - path: "{{ api_home }}/{{ product_name }}" + path: "{{ api_home }}/{{ product_name }}" register: api_metadata_check - name: import API metadata via metadata API directly from local file - uri: - url: "http://{{ api_local_listening_ip_address }}:{{ api_port }}/v1/metadata" - method: POST - return_content: true - body_format: json - headers: - Content-Type: application/json - x-hasura-admin-secret: "{{ api_hasura_admin_secret }}" - x-hasura-role: "admin" - body: "{{ lookup('file','replace_metadata.json') | from_json }}" + uri: + url: "http://{{ api_local_listening_ip_address }}:{{ api_port }}/v1/metadata" + method: POST + return_content: true + body_format: json + headers: + Content-Type: application/json + x-hasura-admin-secret: "{{ api_hasura_admin_secret }}" + x-hasura-role: "admin" + body: "{{ lookup('file','replace_metadata.json') | from_json }}" when: not api_rollback_is_running | bool # do not install latest metadata in case of rollback environment: - http_proxy: "" - https_proxy: "" - # do not use http proxy for metadata import + http_proxy: "" + https_proxy: "" + # do not use http proxy for metadata import diff --git a/roles/common/files/maintenance-info.html b/roles/common/files/maintenance-info.html index 4a8362790a..f31b9ebf93 100644 --- a/roles/common/files/maintenance-info.html +++ b/roles/common/files/maintenance-info.html @@ -33,7 +33,7 @@
Sorry for the inconvenience. Please try again in 10 minutes.
-
+