Splamy / TS3AudioBot

Advanced Musicbot for Teamspeak 3
https://splamy.de/TSAudioBot/Home
Open Software License 3.0
692 stars 140 forks source link

Bot access via query #382

Closed lgund closed 6 years ago

lgund commented 6 years ago

Hallo Splamy,

wie du ja wahrscheinlich weißt, werde ich mir der kommenden Version dein Bot mit ansprechen können. Um es den Endnutzer so angenehm wie möglich zu machen würde ich dem interface gern selber den Token abfragen lassen. Da kommt für mich die Frage auf, ob ein Server admin query die rechte dazu hat? Oder muss diese nach den Installation manuell hinzugefügt werden. Falls ja gibt es die Möglichkeit für den admin query eine ausnahme zu machen?

PS falls du bei deinem nodejs interface Unterstützung braucht schreib mich ruhig an. Bin in nodejs relativ fit.

Mfg Lukas - First-Coder

ShadowFM commented 6 years ago

Bei dem Frontend würde ich auch meine Unterstützung anbieten

lgund commented 6 years ago

Falls du magst @ShadowFM kannst du am Konzept der Botsteuerung in unserem Interface mitwirken.

CookieCr2nk commented 6 years ago

Hallo Igund

Das ist eine sehr konfortable Idee, denn api token mit einer Server query abzufragen. Das ist aber nur dann möglich wenn du der Inhaber des Teamspeak bist. Wenn du aber auf einem fremden Teamspeak bist, dann ist das ja nicht möglich, weil man keine Query besitzt? (Wenn ich falsch bin, dann verbessert mich.)

Splamy commented 6 years ago

First of all, please try to keep issues in english if possible, this helps other users when they stumble across the same problem. I've opened a gitter room for german if anyone wants to talk in german explicitely.

If you can/want to write with the serverquery via chat, then this would work: You have preconfigure the rights.toml like this:

# A serverquery admin rule
[[rule]]
    uid = "serverquery"
    "+" = "*"

# ... other rules

And then write with the serverquery to the bot !api token to get a token. The serverquery always has the fixed uid "serverquery" so this should work without problems.

Keep in mind that a rule like in the example would match the serverquery uid across all instances and servers. If you don't want this you will have to filter (prefereably with the bot matcher) as explanined in the wiki.

If you want to get an api token for the serverquery from api itself, then I don't think this is quite possible. The problem with this approach is that you cannot create an api token for another user; so you'd have to authenticate the serverquery with a token before you even can get a token.

lgund commented 6 years ago

First of all, please try to keep issues in english if possible, this helps other users when they stumble across the same problem.

Sorry.

You have preconfigure the rights.toml

Okey. The idea was that if somebody want to add the bot into our interface he can use a automatic script. Which mean he choose the bot in the interface and the interface write him !api token and get the token. But it´s useless for us if he need first to add some rules. Then he can also just add the token into a input field.

It´s not planned that by default the server admin query can ask for the token?

Splamy commented 6 years ago

This would seem like a weird default setting, and would also have security implications as the serverquery from one server is not the same one as from another server. So whenever you connect a instance to another server, the serveradmin of that server would gain complete control of the ts3ab.

Does your webpanel have access to the file system? You could simply write into the file, or copy it from an internal template bofore you start the ts3ab

lgund commented 6 years ago

Does your webpanel have access to the file system? You could simply write into the file, or copy it from an internal template bofore you start the ts3ab

the bot could be everywhere. I am using your api to communicate with him. The apache user need to have access to the bot and that would be also a security problem. It was just a idea to make it easier to the user. But if it´s not possible I will live without this feature. Maybe in the future you have a idea for this "problem"

ShadowFM commented 6 years ago

What about credentials for the interface and there you can create the bots also? Or instead of the bots file a sql?

Sent with GitHawk

ShadowFM commented 6 years ago

Falls du magst @ShadowFM kannst du am Konzept der Botsteuerung in unserem Interface mitwirken.

@lgund if you want we can talk about it with PM

Sent with GitHawk

lgund commented 6 years ago

You can write me a mail to admin@first-coder.de or better write me a pm on https://forum.first-coder.de/