Coder Social home page Coder Social logo

buddycloud-tests-framework's People

Contributors

fr34kyn01535 avatar guilhermesgb avatar lloydwatkin avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

buddycloud-tests-framework's Issues

Issue from asrenzo

Moreover, I guess that line 38 of buddycloud-tests-framework/blob/master/installation/tests/api_server_connection.py should be

req = Request('HEAD', answer['protocol'] + "://" + answer['domain'] + ":" + str(answer['port']) + answer['path'])

and not

req = Request('HEAD', answer['protocol'] + "://" + answer['domain'] + answer['path'] + ":" + str(answer['port']))

Which would be more pythonic this way if answer really is a dictionnary
req = Request('HEAD', "%(protocol)s://%(domain)s:%(port)s%(path)s" %answer)

Certificate checking

Some checks with TLS/TLS

  • check that only TLS connections are enabled. In other words, check whether you can connect in plaintext and get rejected.
  • check that the site presents a valid certificate
  • check that the site rejects connections from invalid and self-signed certificates.

You will probably need to use openssl's s_client

openssl s_client -connect buddycloud.org:5222 -starttls xmpp
openssl s_client -connect buddycloud.org:5222 -starttls xmpp -xmpphost buddycloud.org

I guess you want to pretend to be another s2s connection and throw the site an invalid certificate.

@guilhermesgb I'd be happy to talk more about this on the next call.

protocol.buddycloud.com continually connecting

I commented on #12 but couldn't see how to reopen, so opening this one. When I try to use protocol.buddycloud.com it gets to the buddycloud discovery test but fails. I then see it continually trying to connect for a long time with following message in prosody logs, repeated every 2 seconds or so:

Jul 26 00:31:38 c2s211be60 info Client connected
Jul 26 00:31:38 c2s211be60 info c2s stream for closed: This server does not serve buddycloud.org
Jul 26 00:31:38 c2s211be60 info Client disconnected: connection closed

Can we make it stop after a few attempts please?

more robust API txt record checking

The check always complains when it's unable to find HTTPS.

But this could be a bigger problem.

EG we got the following record back:

"v=1.0 host=buddycloud.bam.yt protocol=https path=/api port=433"
and
v="1.0 "host=buddycloud.bam.yt "\protocol=https "\path=/api "\port=433"

"Please ensure your API server will run with HTTPS enabled."

Perhaps better to first warn of a malformed record. I mean the record must always have a version, host, protocol, path and port. Without any of those HTTPS or not HTTPS. That's the root cause.

Handle server 5xx responses accordingly

Now there is no clear indication that the client is receiving such responses.
The tests whose requests to the server are being responded that way should be highlighted in yellow and the user should be warned about it appropriately.

Now they can only know such a thing happened if they open up the console (in Chrome).

EDIT: That is not the problem anymore. If exceptions happen during a test execution, that is being displayed nicely as well. Also if a test is malformed.

But if the server goes down (404) or is unable to serve your request (503) to issue a test, the webclient won't display that properly yet.

bypass nameserver caches

If the DNS tests fail at the first try, changes by the admin won't be noticed by the test suite until the TTL expire, which can be counter-intuitive but also limit the usefulness of the test suite.

Tests should bypass the cache and hit directly the responsible nameserver. This can be accomplished with dig +trace.

DISCO test fails (due to timeout?)

When testing for surevine.com's setup the channel server disco failed potentially due to a timeout (after checking the tests). It would be worth checking out why the test failed. Requests for me respond in 1 second using xmpp-ftw so it may not be the timeout.

Allow singleqoutes beside doublequotes in the TXT record.

Hi :)
I don't know if you remember me, i setup buddycloud on my domain a few months ago and found out that Cloudflare had problems with doublequotes in TXT records.

I stopped hacking around and sent 2 support requests to Cloudflare. The first request (CF66300) got closed quickly, the supporters weren't able to figure out why it shouldn't be possible and told be this is by design and the standard for DNS servers. In the second request (CF64630) i quoted a few excerpts of the TXT record specification just to clarify that auto-escaping a doublequote is not "by design". A few days later they closed the request telling me a developer would have a look at it.

Isn't it possible to tighten the belt on the TXT record validation and allow singlequotes aswell? It seems like they are atleast not escaping them. (_buddycloud-api._tcp.bam.yt)

why not allowing CNAMEs for primary domain?

The documentation says we need a record like this:

buddycloud.EXAMPLE.COM.                   IN A            1.2.3.4

First of all, this ditches support for IPv6 completely, which is a shame. Then, it makes it harder to maintain an infrastructure where multiple services are on the same machine. The tests should allow a CNAME here, unless there is a good reason not to.

I couldn't find the standard where this is defined, so bear with me. :)

give feedback and add more columns

From the google doc: https://docs.google.com/a/buddycloud.com/spreadsheet/ccc?key=0AsfJyujQqIAJdEkzUE5wWHhSanRCUXpEZWw2M1htU3c#gid=0

lay out the tests with columns:

  • Test Class (eg XMPP Server, buddycloud server, API)
  • Test (Just use the name from the Google docs)
  • Notes (again, just use the text from the Google Doc)
  • Text for a positive result (also google doc text)
  • Text for a negative result (this is where we need to be able to give the user feedback, for example set the following DNS record and then substitute in the right details)

strange rewrite

  • I want to test buddycloud.textras.com
  • enter the url http://protocol.buddycloud.com/buddycloud.textras.com
  • it gets rewritten to http://protocol.buddycloud.com/textras.com
  • and we test textras.com

It seems like there is an overly aggressive rewrite happening somewhere in the stack.

API record

@abmargb found out that the correct format is

"v=1.0 host=socialcoders.buddycloud.com protocol=https path=/api port=443"

not

_buddycloud-api._tcp.socialcoders.buddycloud.com    IN TXT "v=1.0" "host=buddycloud.socialcoders.buddycloud.com" "protocol=https" "path=/api" "port=433"

(but didn't update the install doc or notify the head of protocol testing. :( grrrr. )

We detected you set up the following incorrect API server TXT records.
You must have just one correct API server SRV record.
These are the SRV records we found and their problems: 

This TXT record is malformed.
"v=1.0 host=socialcoders.buddycloud.com protocol=https path=/api port=443"

The API server TXT record must always have a version, host, protocol, path and port.
Each of these properties must be defined within double quotes and separated by spaces only.
For example, assuming that the server running buddycloud will be named: buddycloud.socialcoders.buddycloud.com,
here you are a TXT record that should work:
_buddycloud-api._tcp.socialcoders.buddycloud.com    IN TXT "v=1.0" "host=buddycloud.socialcoders.buddycloud.com" "protocol=https" "path=/api" "port=433"

Please not that your API server TXT record won't be correct until it contains proper information regarding the version, host, protocol, path and port.
See https://buddycloud.org/wiki/Install#buddycloud_DNS for more information.

Some tests passing that shouldn't/couldn't have...

At surevine.com we've got user registration turned off and none of the test users installed. I still see the following tests passing which shouldn't/couldn't:

buddycloud.org is hardcoded somewhere

I see the following in an (unrelated server's) logs:

Jul 15 16:26:56 c2s1f69fc0 info c2s stream for <54.234.13.21> closed: This server does not serve buddycloud.org
Jul 15 16:26:56 c2s1f69fc0 info Client disconnected: connection closed
Jul 15 16:26:58 c2s2217720 info Client connected

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.