Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
class ConfigResponse(BaseModel):
"""configuration serializer."""

navbar_color: str
navbar_text_color: str
navbar_hover_color: str
navbar_text_hover_color: str
page_size: int
auto_refresh_interval: int
hide_paused_dags_by_default: bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -728,18 +728,6 @@ components:
description: Base Node serializer for responses.
ConfigResponse:
properties:
navbar_color:
type: string
title: Navbar Color
navbar_text_color:
type: string
title: Navbar Text Color
navbar_hover_color:
type: string
title: Navbar Hover Color
navbar_text_hover_color:
type: string
title: Navbar Text Hover Color
page_size:
type: integer
title: Page Size
Expand Down Expand Up @@ -783,10 +771,6 @@ components:
title: Dashboard Alert
type: object
required:
- navbar_color
- navbar_text_color
- navbar_hover_color
- navbar_text_hover_color
- page_size
- auto_refresh_interval
- hide_paused_dags_by_default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
config_router = AirflowRouter(tags=["Config"])

WEBSERVER_CONFIG_KEYS = [
"navbar_color",
"page_size",
"auto_refresh_interval",
"hide_paused_dags_by_default",
Expand All @@ -39,9 +38,6 @@
"require_confirmation_dag_change",
"enable_swagger_ui",
"instance_name_has_markup",
"navbar_text_color",
"navbar_hover_color",
"navbar_text_hover_color",
]


Expand Down
20 changes: 20 additions & 0 deletions airflow-core/src/airflow/cli/commands/config_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,26 @@ def message(self) -> str | None:
config=ConfigParameter("webserver", "expose_hostname"),
renamed_to=ConfigParameter("fab", "expose_hostname"),
),
ConfigChange(
config=ConfigParameter("webserver", "navbar_color"),
renamed_to=ConfigParameter("fab", "navbar_color"),
),
ConfigChange(
config=ConfigParameter("webserver", "navbar_text_color"),
renamed_to=ConfigParameter("fab", "navbar_text_color"),
),
ConfigChange(
config=ConfigParameter("webserver", "navbar_hover_color"),
renamed_to=ConfigParameter("fab", "navbar_hover_color"),
),
ConfigChange(
config=ConfigParameter("webserver", "navbar_text_hover_color"),
renamed_to=ConfigParameter("fab", "navbar_text_hover_color"),
),
ConfigChange(
config=ConfigParameter("webserver", "x_frame_enabled"),
was_deprecated=False,
),
ConfigChange(
config=ConfigParameter("webserver", "base_url"),
renamed_to=ConfigParameter("api", "base_url"),
Expand Down
35 changes: 0 additions & 35 deletions airflow-core/src/airflow/config_templates/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1771,48 +1771,13 @@ webserver:
type: string
example: ~
default: "50"
navbar_color:
description: |
Define the color of navigation bar
version_added: ~
type: string
example: ~
default: "#fff"
navbar_text_color:
description: |
Define the color of text in the navigation bar
version_added: 2.8.0
type: string
example: ~
default: "#51504f"
navbar_hover_color:
description: |
Define the color of navigation bar links when hovered
version_added: 2.9.0
type: string
example: ~
default: "#eee"
navbar_text_hover_color:
description: |
Define the color of text in the navigation bar when hovered
version_added: 2.9.0
type: string
example: ~
default: "#51504f"
default_wrap:
description: |
Default setting for wrap toggle on DAG code and TI log views.
version_added: 1.10.4
type: boolean
example: ~
default: "False"
x_frame_enabled:
description: |
Allow the UI to be rendered in a frame
version_added: 1.10.8
type: boolean
example: ~
default: "True"
instance_name:
description: |
Sets a custom page title for the DAGs overview page and site title for all pages
Expand Down
4 changes: 4 additions & 0 deletions airflow-core/src/airflow/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,10 @@ def sensitive_config_values(self) -> set[tuple[str, str]]:
("api", "expose_config"): ("webserver", "expose_config", "3.0.1"),
("fab", "access_denied_message"): ("webserver", "access_denied_message", "3.0.2"),
("fab", "expose_hostname"): ("webserver", "expose_hostname", "3.0.2"),
("fab", "navbar_color"): ("webserver", "navbar_color", "3.0.2"),
("fab", "navbar_text_color"): ("webserver", "navbar_text_color", "3.0.2"),
("fab", "navbar_hover_color"): ("webserver", "navbar_hover_color", "3.0.2"),
("fab", "navbar_text_hover_color"): ("webserver", "navbar_text_hover_color", "3.0.2"),
}

# A mapping of new section -> (old section, since_version).
Expand Down
20 changes: 0 additions & 20 deletions airflow-core/src/airflow/ui/openapi-gen/requests/schemas.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5786,22 +5786,6 @@ export const $BaseNodeResponse = {

export const $ConfigResponse = {
properties: {
navbar_color: {
type: "string",
title: "Navbar Color",
},
navbar_text_color: {
type: "string",
title: "Navbar Text Color",
},
navbar_hover_color: {
type: "string",
title: "Navbar Hover Color",
},
navbar_text_hover_color: {
type: "string",
title: "Navbar Text Hover Color",
},
page_size: {
type: "integer",
title: "Page Size",
Expand Down Expand Up @@ -5860,10 +5844,6 @@ export const $ConfigResponse = {
},
type: "object",
required: [
"navbar_color",
"navbar_text_color",
"navbar_hover_color",
"navbar_text_hover_color",
"page_size",
"auto_refresh_interval",
"hide_paused_dags_by_default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1449,10 +1449,6 @@ export type type =
* configuration serializer.
*/
export type ConfigResponse = {
navbar_color: string;
navbar_text_color: string;
navbar_hover_color: string;
navbar_text_hover_color: string;
page_size: number;
auto_refresh_interval: number;
hide_paused_dags_by_default: boolean;
Expand Down
4 changes: 0 additions & 4 deletions airflow-core/src/airflow/ui/src/mocks/handlers/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ export const handlers: Array<HttpHandler> = [
hide_paused_dags_by_default: false,
instance_name: "Airflow",
instance_name_has_markup: false,
navbar_color: "#fff",
navbar_hover_color: "#eee",
navbar_text_color: "#51504f",
navbar_text_hover_color: "#51504f",
page_size: 15,
require_confirmation_dag_change: false,
test_connection: "Disabled",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
pytestmark = pytest.mark.db_test

mock_config_response = {
"navbar_color": "#fff",
"navbar_text_color": "#51504f",
"navbar_hover_color": "#eee",
"navbar_text_hover_color": "#51504f",
"page_size": 100,
"auto_refresh_interval": 3,
"hide_paused_dags_by_default": False,
Expand All @@ -51,10 +47,6 @@ def mock_config_data():
with patch("airflow.configuration.conf.as_dict") as mock_conf:
mock_conf.return_value = {
"webserver": {
"navbar_color": "#fff",
"navbar_text_color": "#51504f",
"navbar_hover_color": "#eee",
"navbar_text_hover_color": "#51504f",
"page_size": "100",
"auto_refresh_interval": "3",
"hide_paused_dags_by_default": "false",
Expand Down
11 changes: 0 additions & 11 deletions providers/fab/docs/auth-manager/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,6 @@ FAB auth manager UI security options
This guide only applies to FAB auth manager UI pages. These pages are accessible under category "Security" in the
menu.

Rendering Airflow UI in a Web Frame from another site
------------------------------------------------------

Using Airflow in a web frame is enabled by default. To disable this (and prevent click jacking attacks)
set the below:

.. code-block:: ini

[webserver]
x_frame_enabled = False

Disable Deployment Exposure Warning
---------------------------------------

Expand Down
31 changes: 30 additions & 1 deletion providers/fab/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ source-date-epoch: 1741121873

# note that those versions are maintained by release manager - do not update them manually
versions:
- 2.0.3
- 2.2.0
- 2.1.0
- 2.0.2
- 2.0.1
- 2.0.0
Expand All @@ -57,6 +58,34 @@ config:
fab:
description: This section contains configs specific to FAB provider.
options:
navbar_color:
description: |
Define the color of navigation bar
version_added: 2.2.0
type: string
example: ~
default: "#fff"
navbar_text_color:
description: |
Define the color of text in the navigation bar
version_added: 2.2.0
type: string
example: ~
default: "#51504f"
navbar_hover_color:
description: |
Define the color of navigation bar links when hovered
version_added: 2.2.0
type: string
example: ~
default: "#eee"
navbar_text_hover_color:
description: |
Define the color of text in the navigation bar when hovered
version_added: 2.2.0
type: string
example: ~
default: "#51504f"
access_denied_message:
description: |
The message displayed when a user attempts to execute actions beyond their authorised privileges.
Expand Down
6 changes: 3 additions & 3 deletions providers/fab/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ build-backend = "flit_core.buildapi"

[project]
name = "apache-airflow-providers-fab"
version = "2.0.3"
version = "2.2.0"
description = "Provider package apache-airflow-providers-fab for Apache Airflow"
readme = "README.rst"
authors = [
Expand Down Expand Up @@ -127,8 +127,8 @@ apache-airflow-providers-common-sql = {workspace = true}
apache-airflow-providers-standard = {workspace = true}

[project.urls]
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-fab/2.0.3"
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-fab/2.0.3/changelog.html"
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-fab/2.2.0"
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-fab/2.2.0/changelog.html"
"Bug Tracker" = "https://github.com/apache/airflow/issues"
"Source Code" = "https://github.com/apache/airflow"
"Slack Chat" = "https://s.apache.org/airflow-slack"
Expand Down
2 changes: 1 addition & 1 deletion providers/fab/src/airflow/providers/fab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

__all__ = ["__version__"]

__version__ = "2.0.3"
__version__ = "2.2.0"

if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
"3.0.2"
Expand Down
28 changes: 28 additions & 0 deletions providers/fab/src/airflow/providers/fab/get_provider_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,34 @@ def get_provider_info():
"fab": {
"description": "This section contains configs specific to FAB provider.",
"options": {
"navbar_color": {
"description": "Define the color of navigation bar\n",
"version_added": "2.2.0",
"type": "string",
"example": None,
"default": "#fff",
},
"navbar_text_color": {
"description": "Define the color of text in the navigation bar\n",
"version_added": "2.2.0",
"type": "string",
"example": None,
"default": "#51504f",
},
"navbar_hover_color": {
"description": "Define the color of navigation bar links when hovered\n",
"version_added": "2.2.0",
"type": "string",
"example": None,
"default": "#eee",
},
"navbar_text_hover_color": {
"description": "Define the color of text in the navigation bar when hovered\n",
"version_added": "2.2.0",
"type": "string",
"example": None,
"default": "#51504f",
},
"access_denied_message": {
"description": "The message displayed when a user attempts to execute actions beyond their authorised privileges.\n",
"version_added": "2.0.3",
Expand Down
3 changes: 1 addition & 2 deletions providers/fab/src/airflow/providers/fab/www/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from airflow.providers.fab.www.extensions.init_appbuilder import init_appbuilder
from airflow.providers.fab.www.extensions.init_jinja_globals import init_jinja_globals
from airflow.providers.fab.www.extensions.init_manifest_files import configure_manifest_files
from airflow.providers.fab.www.extensions.init_security import init_api_auth, init_xframe_protection
from airflow.providers.fab.www.extensions.init_security import init_api_auth
from airflow.providers.fab.www.extensions.init_session import init_airflow_session_interface
from airflow.providers.fab.www.extensions.init_views import (
init_api_auth_provider,
Expand Down Expand Up @@ -101,7 +101,6 @@ def create_app(enable_plugins: bool):
init_api_auth_provider(flask_app)
init_api_error_handlers(flask_app)
init_jinja_globals(flask_app, enable_plugins=enable_plugins)
init_xframe_protection(flask_app)
init_airflow_session_interface(flask_app)
return flask_app

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ def prepare_jinja_globals():
extra_globals = {
"server_timezone": server_timezone,
"hostname": hostname,
"navbar_color": conf.get("webserver", "NAVBAR_COLOR"),
"navbar_text_color": conf.get("webserver", "NAVBAR_TEXT_COLOR"),
"navbar_hover_color": conf.get("webserver", "NAVBAR_HOVER_COLOR"),
"navbar_text_hover_color": conf.get("webserver", "NAVBAR_TEXT_HOVER_COLOR"),
"navbar_color": conf.get("fab", "NAVBAR_COLOR"),
"navbar_text_color": conf.get("fab", "NAVBAR_TEXT_COLOR"),
"navbar_hover_color": conf.get("fab", "NAVBAR_HOVER_COLOR"),
"navbar_text_hover_color": conf.get("fab", "NAVBAR_TEXT_HOVER_COLOR"),
"airflow_version": airflow_version,
"git_version": git_version,
"show_plugin_message": enable_plugins,
Expand Down
Loading