Use Cloudron Logins for host protected settings
-
The latest SFU package has OpenID optionally enabled. If you want to use this, you have install a fresh instance which is setup to authenticate with the Cloudron user management.
This will essentially be setup as @MiroTalk has outlined above in 2 by default.
-
Thanks for this. Just to make it clear to people, in order to obtain the behaviour in 2, you still need to modify the config.js file and enable authentication (protected: true). Otherwise, while guest cannot enter the app base domain without a login, they can still create rooms freely by creating a url: mirotalkappprefix.mydomain.com/join/roomname
@MiroTalk is that behaviour intended?
@nebulon perhaps the "protected: true" should be enable by default in the package with OICD as I imagine this is the behaviour most users expect if they want authentication?
-
@avatar1024 said in Use Cloudron Logins for host protected settings:
Otherwise, while guest cannot enter the app base domain without a login, they can still create rooms freely by creating a url: mirotalkappprefix.mydomain.com/join/roomname
@MiroTalk is that behaviour intended?
Not a behaviour intended! I'm considering a refinement where guests are only allowed to join specified rooms that have already been created by authenticated users. This approach might offer better control and security. Will be released in the next version.
-
@MiroTalk said in Use Cloudron Logins for host protected settings:
Not a behaviour intended! I'm considering a refinement where guests are only allowed to join specified rooms that have already been created by authenticated users. This approach might offer better control and security. Will be released in the next version.
I thought that might be the case. Though as I mentioned the behaviour is achieved though by setting "protected: true" in the config.js combined with OICD. It just feels like if OICD is enabled then it shouldn't be possible for guests to create rooms so the setting shouldn't be necessary.
-
I don't get the what the configuration should be to use the OIDC?
From what I understood putting in the
env
fileHOST_PROTECTED=true authRequired=true
Should be enough to use my Cloudron accounts and allow guests to only join created rooms but my accounts aren't recognized I didn't find anything about OIDC/OpenID in the doc
-
Ok I found the block to add in the
env
file :OIDC_ENABLED=false # true or false OIDC_ISSUER_BASE_URL='https://server.example.com' OIDC_BASE_URL='http://localhost:3000' # https://p2p.mirotalk.com OIDC_CLIENT_ID='ClientID' OIDC_CLIENT_SECRET='ClientSecret' OIDC_AUTH_REUIRED=false # set to true if authentication is required for all routes SESSION_SECRET='mirotalk-p2p-oidc-secret'
But I don't know how to set those variables. I created a new client in cloudron
OpenID Connect Provider
but not sure of what the callback URL should be -
-
I keep having the same error when trying to create a room
Oops, Room not allowed This room is not allowed for this user
My config.js file looks like this:
// All options at https://github.com/miroslavpejic85/mirotalksfu/blob/main/app/src/config.template.js module.exports = { host: { /* Host Protection (default: false) To enhance host security, enable host protection - user auth and provide valid usernames and passwords in the users array. */ protected: true, user_auth: false, users: [ /* { username: 'username', password: 'password', }, { username: 'username2', password: 'password2', }, ... */ ] }, presenters: { /* By default, the presenter is identified as the first participant to join the room, distinguished by their username and UUID. Additional layers can be added to specify valid presenters and co-presenters by setting designated usernames. */ list: [], join_first: true, // Set to true for traditional behavior, false to prioritize presenters } };
And looking at the app repo here the config file should look quite different to be able to handle OIDC connection
-
That file overwrites the upstream
config.js
in https://git.cloudron.io/cloudron/mirotalksfu-app/-/blob/main/Dockerfile?ref_type=heads#L13 and then loads the one in/app/data/config.js
and then patches up the process internal config object. Only very specific config options are copied over though. For auth it is only those three essentially https://git.cloudron.io/cloudron/mirotalksfu-app/-/blob/main/config.js?ref_type=heads#L20But maybe to take a step back, whatever is specified regarding oidc in the
/app/data/config.js
will get overwritten during runtime. So that is probably not the root cause of the issue you are facing. -
You are right I misread the Dockerfile, thanks for pointing this out!
Maybe it would it be easier to have an example of a
config.js
file in the documentation.
I guess I'm not the only one failing to configure it
Do I need to create anOpenID Connect Provider
in my Cloudron user directory? -
@cvachery I'm confused by this thread.
You shouldn't need to configue anything.
Just select the relevant User management settings when installing and Cloudron sets it all up, no?
-
I did the same but ticked
Allow all users from this Cloudron
Thing is @jdaviescoates by default anyone can create/join a room. But I want to restrict room creation to logged in users and anyone can join with the link.
And when activating those parameters is when problems arise.