Development Status Not Applicable

Some pages in the book are details about a feature or combination of features. This special status is used for those pages since they are not expected to have a status per se.

See a complete list of features sorted by Snap! Websites Development Status (note that not applicable pages are not shown in that list.)

OAuth2 Implementation

The OAuth2 implementation on Snap! Websites makes use of a GET to log an application in, and a GET to log it out.

Log In

The Log In feature makes use of the Snap-Authorization header field which is 100% copied from the Basic Authorization. We use the name Snap-Authorization because Apache2 does not forward the Authorization header field to Snap!

GET /user/oauth2 HTTP 1.1
Host: snapwebsites.org
User-Agent: Application 1.0
Accept: application/json;q=0.7,application/xml;q=0.5
Snap-Authorization: Snap <base64 from "identifier:secret">

The OAuth2 module gives users two ...

As we are working on Snap! Websites we run in various problems, one of which is the installation process and later the upgrade of a cluster of Snap! Websites servers.

Table of Contents

Security Consideration

Snap! Websites are built to run in a cluster. Because of that, the security of the cluster is mainly insured by the computers in the cluster and not by the servers themselves.

There are a few known points that render the Snap! Websites service weak in terms of security if people other than you can access your computers via a network connection or directly:

  • Most of the tools (snapserver, ...

Introduction

TBD: we may want to derive all the data used in the SNSD files from Data Types feature (schema).

The basic of SNSD (Snap Software Description) is an XML file that describes various types of software products (libraries, servers, GUI based software, etc.) On a Snap! website a page used to describe a software product can have a link to SNSD meaning that that page represents a file that should appear in the SNSD catalog.

The XML files offered give third party systems a way to quickly learn about all the files that you are offering. The SNSD data can be found on specific pages, in the HTML ...

404 Plugin Missing

This 404 error means that something is missing.

If you had a plugin installed and you removed it, then re-installing it will most certainly fix the problem. Remember that if you change the list of plugins in the /etc/snapwebsites/snapserver.conf file, you have to restart the server for the change to be taken in account.

If you are a programmer and you get this error and you know for sure that the plugin is loaded (you tried to restart and made sure that the plugin name appears in the snapserver.conf file or in the sites parameters,) then the next thing to look into is whether you implemented ...

Errors Explains

The following pages explain what various errors that you get while using and especially programming Snap mean.

To the end user, we send errors that are at times a bit cryptic. One important reason for doing so is that errors that are too detailed may give hackers means to access your system in unwanted ways. To at least aleviate some potential security issues, we instead send rather simple errors such as a 404 when something is missing without automatically giving you the exact right message about what is missing.

Browsers sends us a string called the User Agent designation. A server can use that User Agent string to determine what browser is used to access the site, including the version and different features that it supports or not.

Using the User Agent information, we can define the name of the browser (Internet Explorer, FireFox, SeaMonkey, Chrome, Safari, Opera, various smart phones, etc.) and the version of the browser used. This information can in turn be used to determine which files to send to the browser to make it work better.

For JavaScript and CSS files we can use that information to ...

As I upgraded my computer to 13.10, I got errors from Cassandra which seemed strange. That is, Java was failing saying that Cassandra wanted more heap that was made available to it.

I was rather surprised since I had not changed anything in Cassandra. However, thinking about it, the heap offered to Java to run Cassandra is defined as the total amount of RAM available divided by 2. And since I'm running a new kernel, I would imagine that this new kernel uses more RAM. Notice that since the math used is:

Amount of Mb available / 2

If your kernel makes use of another 100Mb to run, you ...

As you use Cassandra, once in a while some of the tables they handle will get corrupted. In most cases, I think that happens when I restart my computer without first killing Cassandra. One problem with Cassandra is that it may take seconds between the kill command and Cassandra actually exiting. If you shutdown your computer, the kill sent to command waits something like 1 second before sending a -9 (i.e. actual KILL signal instead of just TERM.)

The result is that it may leave some files (tables) in an unknown state. These files can be deleted though, but you have to be careful. Make sure ...

As I am working on the system, I often saw this error saying that the server could not connect.

I now know exactly why it happens, and have a very simple solution.

When I setup the Snap! C++ server to connect to the Cassandra server, I used "localhost" as the address. Since we only want to connect to Cassandra locally while doing development (once installed, not so much!)

The result of using localhost is that the address lookup returns two addresses:

IPv6 or [::1]
IPv4 or 127.0.0.1

Then the Thrift library decides to first test the IPv6 address (which makes sens, they are ...

The process can be hard to follow because many signals get called.

The following is an attempt in helping you (developers) find your way better in the Snap! environment.

  1. snap.cgi gets called by Apache
  2. snap.cgi connects to snapserver
  3. snap.cgi sends the Apache parameters to snapserver
  4. snapserver creates a snap_child object
  5. snap_child verifies the data sent by snap.cgi
  6. snap_child loads the plugins
  7. snap_child calls the execute() signal
  8. path plugin responds by checking that the path is valid:
    1. Page is in Cassandra: get the ...
Syndicate content Syndicate content

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly