question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to use http_node / http_static endpoints with credentials

See original GitHub issue

Hi.

I’m trying to set up an http in node endpoint with custom login credentials, but I can’t get it to work. Either the configured credentials are not working or I’m forced to use Hassio admin credentials.

Steps to reproduce:

  • Simple Node-RED http in node -> Method: GET, URL: /simpletest
  • Add-on config:
    • Web interface port 1880
    • http_node + http_static (same user/password set for both)
      • http://<mycustomduckdnshost>.org:1880/simpletest Result: login prompt. Neither http_node nor Hassio admin credentials work.
      • http://<mycustomduckdnshost>.org:1880 Result: login prompt. Hassio admin login works. Shows Node-RED admin UI

Even tried changing settings.js httpAdminRoot: ‘/admin’. Same happens, just using http://<mycustomduckdnshost>.org:1880/admin instead.

I’m testing always clearing Local Storage auth credentials (https://github.com/hassio-addons/addon-node-red/issues/190#issuecomment-483463573)

Also tried adding to configuration.yaml as stated here (https://github.com/hassio-addons/addon-node-red/issues/184#issuecomment-483230107)

  auth_providers:
    - type: homeassistant

I was using reverse proxy and SSL at first, but now I am testing with plain HTTP and port. Also trying LAN access using HASSIO IP, same result.

I’ve only been able to access the endpoint this way, but don’t want to use Hassio credentials:

  • http_node + http_static default config (no user/password):
    • http://<mycustomduckdnshost>.org:1880/simpletest Result: login prompt. Hassio admin login works. Shows endpoint response
    • http://<mycustomduckdnshost>.org:1880 Result: login prompt. Hassio admin login works. Shows Node-RED admin UI

Any clues?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
frenckcommented, May 18, 2019

This issue has been addressed in our development version and will be generally available in the next release.

0reactions
addons-assistant[bot]commented, Jun 21, 2019

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enabling HTTPS on express.js - Stack Overflow
In express.js (since version 3) you should use that syntax: var fs = require('fs'); var http = require('http'); var https ...
Read more >
The Complete Guide to Node.js User Authentication with Auth0
This tutorial demonstrates how to secure a Node.js web application built with the Express framework by implementing user authentication.
Read more >
Cross origin http request CORS fails with response header ...
Cross origin http request (CORS) to Azure function does not return 'Access-Control-Allow-Credentials:true'. Is there a way to add custom headers?
Read more >
Loading Credentials in Node.js from the Shared Credentials File
If the AWS_PROFILE variable is not set in your environment, the SDK uses the credentials for the [default] profile. To use one of...
Read more >
TLS (SSL) | Node.js v19.3.0 Documentation
ALPN: Allows the use of one TLS server for multiple protocols (HTTP, HTTP/2) ... is available as an alternative to normal certificate-based authentication....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found