Skip to content

Authentication Credentials Reset Automatically in Header Auth Configurations in n8n #12596

Description

@Moises-cmyk

Bug Description

Issue Description:

I am experiencing an issue while working on the beginner course exercise in n8n: Building the Workflow, specifically in Part 1: Getting data from the data warehouse.

The problem occurs when I try to configure the HTTP Request node using Header Auth. After entering the correct api_key value (j[vKYdY68H(:WFb) in the Header Auth credentials, it automatically resets to a placeholder value (__n8n_BLANK_VALUE...) once I save and close the configuration.

This results in an error when testing the workflow:
"Forbidden - perhaps check your credentials? Authorization data is wrong!"

I have verified that the key is correct and entered it multiple times. However, the value consistently resets itself after saving. I also attempted the following steps without success:

  1. Creating a new workflow and reconfiguring the HTTP Request node.
  2. Using other authentication methods, such as adding the api_key manually in the "Send Headers" section.
  3. Encoding special characters in the api_key using percent-encoding.

This issue persists and prevents me from completing the exercise. It seems to be a bug related to how n8n handles sensitive credentials in Header Auth.

Could you please provide assistance or guidance on resolving this? Let me know if you need further details.

To Reproduce

Steps to reproduce the behavior:

  1. Start the beginner course exercise in n8n: Building the Workflow, specifically in Part 1: Getting data from the data warehouse.
  2. Add an HTTP Request node to the workflow.
  3. Configure the node as follows:
    • Method: GET
    • URL: Provide the correct endpoint URL (e.g., https://internal.users.n8n.cloud/webhook/custom-erp?unique_id=5fa2535192afe364e61c9a3e485f75e3).
    • Authentication: Select Generic Credential Type.
    • Generic Auth Type: Set to Header Auth.
  4. In the Header Auth configuration:
    • Enter the Header Auth name as api_key.
    • Enter the Header Auth value as j[vKYdY68H(:WFb.
    • Save the credentials.
  5. Test the node by clicking Execute Node.
  6. Reopen the HTTP Request node configuration.

Expected behavior:
The api_key value (j[vKYdY68H(:WFb) should remain unchanged and the request should authenticate successfully.

Actual behavior:

  • The api_key value is automatically replaced with __n8n_BLANK_VALUE... after saving and closing the configuration.
  • Executing the node results in the error: "Forbidden - perhaps check your credentials? Authorization data is wrong!"

Let me know if you need more details!
<img width="716" alt="Captura de
Captura de pantalla 2025-01-14 102740
pantalla 2025-01-14 102626" src="https://github.com/user-attachments/assets/54a227aa-b33c-47df-b6fe-7d9d14f1eba0" />

Expected behavior

The api_key value (j[vKYdY68H(:WFb) should be saved correctly in the Header Auth configuration without being replaced by the placeholder __n8n_BLANK_VALUE.... Upon executing the HTTP Request node, the workflow should authenticate successfully and retrieve data from the endpoint without any authorization errors. This would allow me to proceed with the beginner course exercise without issues.

Operating System

Windows 11

n8n Version

1.72.1 (Self Hosted)

Node.js Version

n8n-nodes-base.httpRequest

Database

SQLite (default)

Execution mode

main (default)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions