Feed aggregator

Tigase server development: RE: Where is the best place for "Filter and Block message" logic?

Tigase XMPP Server Board - Thu, 10/30/2014 - 17:44

You can do the same thing in the "filer" as you do in the "preprocessor". You can amend the message or block it completely form delivering. The main difference is that you do it later in the processing chain. This may mean like a bad idea as if you block something you want to do it as quickly as possible. However, the main advantage is that "filter" is being processed in the plugin thread pool. Therefore it does not impact main processing in SessionManager, therefore it overall impact on the server performance is much lower.

Categories: Tigase Forums

Tigase server development: RE: Message Carbons - Client support

Tigase XMPP Server Board - Thu, 10/30/2014 - 16:47

I am afraid it is not possible right now.

Categories: Tigase Forums

Tigase server development: Message Carbons - Client support

Tigase XMPP Server Board - Thu, 10/30/2014 - 16:22

Hi Tigase team,

I'm using Tigase server version 5.2.2 for Message Carbons feature. According to the XEP-0280, the client has to signal the server that it supports the Carbons protocol. Instead of each client signaling, is it possible to enable at the system level on the tigase server (so it applies for all the clients)?

Thank You.

Categories: Tigase Forums

Tigase server development: RE: Create an administrator

Tigase XMPP Server Board - Thu, 10/30/2014 - 03:28

Thank you for your answer!
I'm new to xmpp did not take long,Also please tell me how to configure.Thanks.

Categories: Tigase Forums

Tigase server development: RE: Create an administrator

Tigase XMPP Server Board - Thu, 10/30/2014 - 02:35

From your configuration - admin@192.168.0.50 is the administrative account (however you should avoid using IP as an VHost).

As for the configuration - it looks like you are configuring room to be members only and user that joins the room is not configured as member of the room.

Categories: Tigase Forums

Tigase server development: RE: Where is the best place for "Filter and Block message" logic?

Tigase XMPP Server Board - Thu, 10/30/2014 - 01:47

Thanks Artur,

not sure that I can use XMPPPacketFilterIfc here because I have to filter a message before block it.
As I know, XMPPPacketFilterIfc is the last chaine in Session Manager process packets logic.

Categories: Tigase Forums

Tigase server development: RE: Create an administrator

Tigase XMPP Server Board - Wed, 10/29/2014 - 23:49

Yes,My configuration is
--admins=admin@192.168.0.50
This description is not an administrator account is it?

I let the administrator to enter the chat room. That means the owner of this room is an administrator,
but when other users enter the following error appears
<presence xmlns="jabber:client" to="38@192.168.0.50/xmpp" from="talk5s@muc.192.168.0.50/38" type="error"><x xmlns="http://jabber.org/protocol/muc"><history seconds="600"/></x><c xmlns="http://jabber.org/protocol/caps" ver="k6gP4Ua5m4uu9YorAG0LRXM+kZY=" hash="sha-1" node="https://github.com/robbiehanson/XMPPFramework"/><error code="407" type="auth"><registration-required xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></presence>
Please help me,Thanks!
Categories: Tigase Forums

Tigase server development: RE: Create an administrator

Tigase XMPP Server Board - Wed, 10/29/2014 - 22:44

Lonely Lonely wrote:

Hi,
After I installed, how to create an administrator account?

If you used Installer then administrator account is created automatically. Otherwise you need to create it by hand - for example directly accessing database and using TigAddUserPlainPw('user@jid','password'); stored procedure.

And create a chat room by an administrator, other users automatically enter the room? Tell me how to operate?

MUC rooms are created automatically after first user joins.

Categories: Tigase Forums

Tigase server development: Create an administrator

Tigase XMPP Server Board - Wed, 10/29/2014 - 19:58

Hi,
After I installed, how to create an administrator account? And create a chat room by an administrator, other users automatically enter the room? Tell me how to operate?

Categories: Tigase Forums

Tigase server development: RE: Where is the best place for "Filter and Block message" logic?

Tigase XMPP Server Board - Wed, 10/29/2014 - 15:52

This is correct. A better place for the filtering like in your case would be to implement it as a filter: *XMPPPacketFilterIfc *.

Categories: Tigase Forums

Tigase server development: Where is the best place for "Filter and Block message" logic?

Tigase XMPP Server Board - Wed, 10/29/2014 - 14:07

Where is the best place for "Filter and Block message" logic?

For example I would like to build a logic to filter messages for bad words and block messages if there are to many bad words in a message.

Let's say we would like to filter all messages for word 'sucks'.
If there are 3 or less occurrences - just replace it with **, but if more than 3 - block a message.

I read this guide http://docs.tigase.org/tigase-server/5.3.0/devguide/#_introduction
and found that the best place to block messages is Pre-processor, so I customised MessageAmp.java class with next way:

@Override public boolean preProcess(Packet packet, XMPPResourceConnection xmppResourceConnection, NonAuthUserRepository nonAuthUserRepository, Queue<Packet> packets, Map<String, Object> stringObjectMap) { Element bodyChild = packet.getElement().getChild("body"); String body = bodyChild.getCData(); String repfrom = "sucks"; String repto = "****"; int counter = 0; Pattern p = Pattern.compile(repfrom, Pattern.LITERAL); Matcher m = p.matcher(filteredBody); StringBuffer sb = new StringBuffer(); while (m.find()) { counter++; m.appendReplacement(sb, repto); } m.appendTail(sb); String filteredBody = sb.toString(); if(counter > 3){ return true; } // set filtered body List<XMLNodeIfc> newChildren = new LinkedList<XMLNodeIfc>(); newChildren.add(new CData(filteredBody)); bodyChild.setChildren(newChildren); return false; }

It works, but then I found next info in a guide:

Pre-processing - all loaded pre-processors receive the packet for processing. They work within session manager thread and they have no internal queue for processing. As they work within Session Manager thread it is important that they limit processing time to absolute minimum as they may affect the Session Manager performance. The intention for the pre-processors is to allow them for packet blocking. If the pre-processing result is true then the packet is blocked and no further processing is performed.

So I'm not sure about this solution

Could you please assist?

Categories: Tigase Forums

Tigase server administration: RE: Tigase BOSH Secure Connections

Tigase XMPP Server Board - Wed, 10/29/2014 - 09:08

Hi Wojciech Kapcia,

Your help is great. Now the openssl s_client -connect 54.255.71.55:5281 perfectly hand shakes with self signed certificates.

Now Pidgin Client is also connected successfully

THANKS A TON !!!

Regards
Khaleel

Categories: Tigase Forums

Tigase server administration: RE: Tigase BOSH Secure Connections

Tigase XMPP Server Board - Wed, 10/29/2014 - 08:49

This is the proper configuration:
--bosh-ports=5280,5281 bosh/connections/5281/socket=ssl bosh/connections/5281/type=accept

First line will be used as general system property (hence double dash prefix: "--"), second and third lines are component configuration and therefore they are not prefixed with dashes.

Categories: Tigase Forums

Tigase server administration: RE: Tigase BOSH Secure Connections

Tigase XMPP Server Board - Wed, 10/29/2014 - 08:34

Hi,

I have changed the

bosh-ports=5280,5281

to

bosh/connections/ports=5280,5281

then restarted the server, still I am getting the Connection refused error. Even on the Pidgin client instead of SSL Handshake error, now I am getting SSL Connection failed error.

So I am reverting back the properties as shown below No [i],[s] types mentioned at the error, can you please verify these parameters if any mistake is there?

--bosh-ports=5280,5281
--bosh/connections/5281/socket=ssl
--bosh/connections/5281/type=accept

Regards
Khaleel

Categories: Tigase Forums

Tigase server administration: RE: Tigase BOSH Secure Connections

Tigase XMPP Server Board - Wed, 10/29/2014 - 08:24

Hi

I have the properties mentioned with preceding -- characters as shown below, no spaces exists

--bosh-ports=5280,5281
--bosh/connections/5281/socket=ssl
--bosh/connections/5281/type=accept

I have removed the -- at the beginning to the above three parameters and restarted the server.
Now the openssl is not opening any connection, I am getting below error

[ec2-user@ip-10-146-138-237 certs]$ openssl s_client -connect 54.255.71.55:5281
socket: Connection refused
connect:errno=111

Regards
Khaleel

Categories: Tigase Forums

Tigase server administration: RE: Tigase BOSH Secure Connections

Tigase XMPP Server Board - Wed, 10/29/2014 - 08:10

Can you check that Tigase is in fact listening on 5281 port? Make sure there are no spaces in the configuration, that is:
bosh/connections/ports=5280,5281

Categories: Tigase Forums

Tigase server administration: RE: Tigase BOSH Secure Connections

Tigase XMPP Server Board - Wed, 10/29/2014 - 08:03

Hi,

I have copied the 54.255.71.55.pem to default.pem and the stopped the server and restarted. Still I am getting SSL Handshak fail error.

When I do the openssl s_client -connect 54.255.71.55:5281 , I am getting below response.

CONNECTED
139994109458248:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:177:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 247 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE

Regards
Khaleel

Categories: Tigase Forums

Tigase server development: RE: xmpp-server cluster problem

Tigase XMPP Server Board - Wed, 10/29/2014 - 07:48

There is no need to specify nodes at all - you simply enable cluster mode with:
--cluster-mode = true
and that's enough.

Categories: Tigase Forums

Tigase server administration: RE: Tigase BOSH Secure Connections

Tigase XMPP Server Board - Wed, 10/29/2014 - 07:48

Hasn't certs/default.pem been generated after bosh connection? Please try to copy 54.255.71.55.pem to default.pem, restart the server and try again with openssl

Categories: Tigase Forums

Tigase server administration: RE: Tigase BOSH Secure Connections

Tigase XMPP Server Board - Wed, 10/29/2014 - 07:29

Hi,
My observations are:
1. When the Tigase server is down then get error response to the command " openssl s_client -connect 54.255.71.55:5281" below
socket: Connection refused
connect:errno=111

2. When the Tigase server is up then I get the below response to the above command, so I guess the PORT is open and functioning well.

CONNECTED
140349342308168:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:177:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 247 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
---

3. I have deleted all the .pem files and restarted the server, then I try to connect from Pidgin client with a user over the normal socket connection on 5222 port, user connected successfully. and a certificate with my domain ip pem (54.255.71.55.pem) generated.

4. Now if I try to connect from Pidgin tool using the BOSH URL "https://54.255.71.55:5281/http-bind" then the response is SSL Handshake is failed error.

Log files are attached.

Could you please help what could be the issue.

Regards
Khaleel

Categories: Tigase Forums

Pages

Get in touch

We provide software products, consulting and custom development services

Tigase, Inc.
100 Pine Street, Suite 1250
San Francisco, CA 94111, USA
Phone: (415) 315 9771

Follow us on:

Twitter

  • Our public servers are tigase.im, sure.im, jabber.me. Create a new account in Tigase Messenger and select one of them http://t.co/PS6geOU8QD 4 days 3 hours ago
  • Using a public server at sure.im, tigase.im, jabber.me receive special optimizations for Tigase Messenger. http://t.co/jipOgWbX3g 6 days 20 hours ago
Back to Top