I am trying to set up janus with HTTP and use nginx as a proxy to handle SSL. I have set up my nginx locations to pass admin requests, but when I try to add_token I am getting this reply: “Stored-Token based authentication disabled”. In janus.jcfg I have token_auth = true and admin_secret set. Any suggestions?
Make sure it’s not commented out with a #
in front of it, which is the default:
Yes, token_auth is uncommented. I should add that this was working when I was having janus handle SSL, so I assume that change is having an effect.
It has nothing to do with SSL. This is a core property, and the core knows nothing about transports, which are separate plugins (like http or WS).
Understood. Just giving all info in case it may be relevant. Can you offer any suggestions about what might be wrong?
Send an “info” request (or do a GET on /janus/info
, if using HTTP), and that will tell you if auth tokens are enabled as far as Janus is concerned. If not, you may enabling it wrong (e.g. in the wrong section of the configuration file, or a different configuration file is in use). Passing -A
on the command line also enables them, if you want to double check.
GET /janus/info tells me that “auth_token” is false.
Here is the “general” section from janus.jcfg:
configs_folder = "/opt/janus/etc/janus"
plugins_folder = "/opt/janus/lib/janus/plugins"
transports_folder = "/opt/janus/lib/janus/transports"
events_folder = "/opt/janus/lib/janus/events"
loggers_folder = "/opt/janus/lib/janus/loggers"
token_auth = true
admin_secret = "xxxxxxxxxxxxxxxxxxxx"
debug_level = 4
interface = "172.31.42.83"
Are “auth_token” and “token_auth” related?
They’re the same thing. It works as expected for me. Have you checked the -A
on the command line?