Projects tigase _server server-core Issues #520
Option to add components to 'trusted' list (#520)
Closed
wojciech.kapcia@tigase.net opened 9 years ago
Due Date
2015-07-09

Add option that will append list of all/chosen components addresses within cluster to the trusted list, as to avoid manual modification of configuration file, as per:

https://projects.tigase.org/projects/tigase-pubsub/wiki/REST_API

Andrzej Wójcik (Tigase) commented 9 years ago

I implemented support for:

  • setting global list of trusted using --trusted setting

  • setting per component list of trusted using trusted setting in component configuration

In each of this setting as entry which should be trusted it may be passed jid which may include {clusterNode} variable in it, which will force server to add this entry for each of cluster node, ie. if trusted would be set like this:

--trusted=trusted@example.com,http@{clusterNode} 

and we would have 2 cluster nodes test1 and test2 this will be same as setting:

--trusted=trusted@example.com,http@test1,http@test2

If another cluster node will connect then property will be updated for this newly added node.

--trusted is also used to set list of default trusted jids for VHosts, but in this case entries with {clusterNode} will be skipped as this should not be used to set permission on per VHosts basis but on installation or per component basis.

However this change required me to implement ClusteredComponentIfc in BasicComponent as I needed info about every connected/disconnected node on this level. This was needed by the fact that I need to update set of trusted jids when . I updated all existing implementations of ClusteredComponentIfc to call methods from super class to make this work properly.

Now looking at currect implementation of methods nodeConnected and @nodeDisconnected@, I think that in most cases they have very similar implementation in almost every clustered component and similar to current implementation in @BasicComponent@. We could use this and refactor our code so that we would have one implementation of this methods if possible. This is thing to consider.

wojciech.kapcia@tigase.net commented 9 years ago

I've updated PubSub ad-hocs to use changed code and now it works as expected.

Another issue I've encountered - if there's no script then there is no response to the sending entity - I think returning item-not-found in that case -- %kobit , do you agree?

Now looking at currect implementation of methods nodeConnected and @nodeDisconnected@, I think that in most cases they have very similar implementation in almost every clustered component and similar to current implementation in @BasicComponent@. We could use this and refactor our code so that we would have one implementation of this methods if possible. This is thing to consider.

I think this is a good idea - would definitely simplify the implementation.

wojciech.kapcia@tigase.net commented 9 years ago
Andrzej Wójcik (Tigase) commented 9 years ago

I fixed issue found during TTS test

issue 1 of 1
Type
New Feature
Priority
Normal
Assignee
RedmineID
3244
Version
tigase-server-7.1.0
Estimation
8h
Spent time
9h
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#520
Please wait...
Page is in error, reload to recover