diff --git a/ChangeLog b/ChangeLog index 5a1d41f..21d4ad6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,358 @@ +2013-11-26 Georg Hopp georg@steffers.org + * M assets/js/application.js: + * M assets/js/session.js: + update user informations when session timeouts + * M src/http/parser/p_post_vars.c: + fix urldecode of post vars. I can't urldecode the whole + body and then start splitting it into values because the + urldecode can add reserved characters. I have to urldecode + each value by it's own. TODO: check if the keys have to be + urldecoded too. + * M include/utils/http.h: + * M src/http/parser/p_post_vars.c: + * M src/utils/http.c: + urldecode post values + * M src/taskrambler.c: + more valgrind indicated fixes + +2013-11-25 Georg Hopp georg@steffers.org + * M src/http/worker/get_asset.c: + reduce expire for assets to 12 hours...currently I expect + changes even more often. At the end this is another condidate + for the configuration file. + * M src/application/controller/signup/create.c: + * M src/application/controller/user/create.c: + * M src/application/controller/user/update.c: + * M src/application/create_user.c: + * M src/application/login.c: + * M src/application/update_password.c: + * M src/application/update_user.c: + * M src/config/config.c: + * M src/config/value.c: + fixed various memory management issues detected with valgrind + +2013-11-24 Georg Hopp georg@steffers.org + * D assets/js/session.orig.js: + remove obsolete file + * M Makefile.am: + * M assets/html/_menu.html: + * A assets/html/_myaccount.html: + * M assets/html/layout.html: + * M assets/js/application.js: + * M assets/js/init.js: + * M assets/js/menu.js: + * M assets/style/common.css: + * M assets/style/taskrambler.css: + * M include/application/application.h: + * M src/application/Makefile.am: + * A src/application/controller/_get_credential_from_args.c: + * A src/application/controller/_get_user_from_args.c: + * M src/application/controller/_process_user_create_args.c: + * A src/application/controller/_update_user_from_args.c: + * A src/application/controller/user/update.c: + * A src/application/update_user.c: + * M src/http/worker/process.c: + * M src/router/route.c: + basic user update functionality + * M Makefile.am: + add missing javascript files and optimize symlink creation + * M src/storage/storage.c: + create database files world read-/writable + * M Makefile.am: + install working directories as world read-/writeable and + symlink layout instead of installing the files. + +2013-11-11 Georg Hopp georg@steffers.org + * M assets/html/layout.html: + * A assets/js/application.js: + * M assets/js/init.js: + * A assets/js/menu.js: + * M assets/js/session.js: + * A assets/js/session.orig.js: + * A assets/js/user.js: + some work on the javascript... + still I think it's not very good, but better than before. + +2013-11-10 Georg Hopp georg@steffers.org + * M Makefile.am: + * M assets/html/layout.html: + * A assets/js/jquery.ui.touch-punch.min.js: + add jQuery ui touch-punch for draggable support on + mobile devices. Thanks to Dave Furfero. + * M assets/js/session.js: + * M include/user.h: + * M src/application/controller/_process_user_create_args.c: + * M src/application/controller/currentuser/read.c: + * M src/application/login.c: + * M src/user/user.c: + add username to user class. This will contain the common + name (cn) of an ldap authenticated user and the email + address of an otherwise authenticated user. This is done + to be able to have a good way to store an application user + for ldap authenticated users. + * M include/application/application.h: + * M src/application/application.c: + * M src/taskrambler.c: + use the new authentication container + * M include/auth/auth.h: + * M src/auth/Makefile.am: + * A src/auth/auth.c: + * A src/auth/create.c: + created an authentication container. This could initialize + the needed authentications and then be injected as a single + object into the application class + * M include/class/interface/class.h: + * M src/class/interface/i_class.c: + add function to create an object with a va_list pointer + instead of its argument list. Obviously the va_list must + contain the correct values for the class constructor. + +2013-11-09 Georg Hopp georg@steffers.org + * M assets/html/_author.html: + * M assets/html/_login.html: + * M assets/html/_signup.html: + * M assets/html/layout.html: + * M assets/js/init.js: + * M assets/style/common.css: + * M assets/style/taskrambler.css: + make signup and login popup visually more fitting to the + rest of the pages. + +2013-11-08 Georg Hopp georg@steffers.org + * M assets/html/layout.html: + * M assets/js/init.js: + * M assets/style/common.css: + make login and signup div draggable and cast shadows + * M Makefile.am: + install jqeury ui files + * A assets/js/jquery-ui-1.10.3.min.js: + * A assets/js/jquery-ui.js: + * A assets/style/images/animated-overlay.gif: + * A assets/style/images/ui-bg_flat_0_aaaaaa_40x100.png: + * A assets/style/images/ui-bg_flat_75_ffffff_40x100.png: + * A assets/style/images/ui-bg_glass_55_fbf9ee_1x400.png: + * A assets/style/images/ui-bg_glass_65_ffffff_1x400.png: + * A assets/style/images/ui-bg_glass_75_dadada_1x400.png: + * A assets/style/images/ui-bg_glass_75_e6e6e6_1x400.png: + * A assets/style/images/ui-bg_glass_95_fef1ec_1x400.png: + * A assets/style/images/ui-bg_highlight-soft_75_cccccc_1x100.png: + * A assets/style/images/ui-icons_222222_256x240.png: + * A assets/style/images/ui-icons_2e83ff_256x240.png: + * A assets/style/images/ui-icons_454545_256x240.png: + * A assets/style/images/ui-icons_888888_256x240.png: + * A assets/style/images/ui-icons_cd0a0a_256x240.png: + * A assets/style/jquery-ui-1.10.3.min.css: + * A assets/style/jquery-ui.css: + add jquery ui for nice ui effects + * A docs/ups-cookie_disclosure.pdf: + * M TODO: + update TODO + +2013-11-07 Georg Hopp georg@steffers.org + * M assets/html/_footer.html: + * M assets/js/init.js: + * M include/application/application.h: + * M src/application/Makefile.am: + * M src/application/application.c: + * A src/application/controller/loc/read.c: + display lines of code in page footer + * M configure.ac: + add lines of code to config.h ... + make me able to display these in the application + * M Makefile.am: + add make target to measure lines of code + * M include/application/application.h: + * M src/application/Makefile.am: + * M src/application/create_user.c: + * D src/application/signup.c: + remove no longer used application signup method + * M .gitignore: + * M Makefile.am: + create make target for ctags file and ignore the generated + file with git + +2013-11-06 Georg Hopp georg@steffers.org + * M assets/js/init.js: + * M include/application/application.h: + * M src/application/Makefile.am: + * A src/application/controller/_process_user_create_args.c: + * A src/application/controller/_validate_email.c: + * A src/application/controller/_validate_password.c: + * A src/application/controller/_validate_password_repeat.c: + * A src/application/controller/signup/create.c: + * M src/application/controller/user/create.c: + * A src/application/controller/user/read.c: + * A src/application/create_user.c: + * A src/application/get_user.c: + * A src/application/update_password.c: + * M src/router/route.c: + generalise user handling more so that not only signup + and login is possible but also password or userdata changes + and further administration. + * M include/storage/storage.h: + * M src/storage/Makefile.am: + * A src/storage/delete.c: + add storage delete functionality + * M src/testers/uuid.c: + test code for zeroUuid on stack + * M include/user.h: + remove unnecessary stuff in user declaration + * M include/permission.h: + * M include/role.h: + some more stuff in rbac files... + still nothing really useful, but finally I have more or + less an idea how to implement it + * M include/uuid.h: + * M src/uuid/uuid.c: + add zero uuid instance + * M include/class/class.h: + add makros to create an instance of a class on the + stack (ment for global constant instances that never change, + eg. defined NULL values) + +2013-11-05 Georg Hopp georg@steffers.org + * M include/application/application.h: + * M include/auth/interface/auth.h: + * A include/interface/indexable.h: + * A include/interface/serializable.h: + * M src/Makefile.am: + * M src/application/application.c: + * M src/application/login.c: + * M src/application/session_cleanup.c: + * M src/application/signup.c: + * M src/auth/interface/auth.c: + * M src/auth/ldap.c: + * M src/auth/storage/storage.c: + * A src/interface/indexable.c: + * A src/interface/serializable.c: + * M src/taskrambler.c: + * M src/user/Makefile.am: + * D src/user/load.c: + * D src/user/save.c: + * M src/user/user.c: + remove specialized load and save from user, add serializable + and indexable interface and make user utilize both and store + a user and its credentials keyed by its uuid + +2013-10-27 Georg Hopp georg@steffers.org + * M src/uuid/version3.c: + * M src/uuid/version5.c: + delete temporary uuid data structures. + * M src/server/server.c: + NSA makes me paranoid ... + try to get best supported cipher of the used browser and + don't use RC4 at all + +2013-10-25 Georg Hopp georg@steffers.org + * M src/testers/uuid.c: + fix and test uuidCompare + * M configure.ac: + * M include/session.h + * M include/user.h + * M include/uuid.h + * M src/Makefile.am + * M src/router/route.c + * M src/testers/uuid.c + * M src/user/save.c + * A src/uuid/Makefile.am: + * A src/uuid/_format3or5.c: + * A src/uuid/compare.c: + * A src/uuid/parse.c: + * A src/uuid/unparse.c: + * A src/uuid/uuid.c: + * A src/uuid/version1.c: + * A src/uuid/version3.c: + * A src/uuid/version5.c: + add code to generate uuid version 3 and 5. + With this we can generate the same uuid for a given name + all the time + * A include/permission.h: + * D include/rbac/permission.h: + * D include/rbac/role.h: + * A include/role.h: + some more work on rbac + +2013-10-23 Georg Hopp georg@steffers.org + * M assets/js/init.js: + remove old deactivated json request for logout + * A include/uuid.h: + start of an own uuid class. This will simply wrap existing + code for random uuids and add code to generate uuid for + namespace unique items. + * M assets/js/init.js: + * M configure.ac: + * M include/application/adapter/http.h: + * M include/http/request.h: + * A include/router.h: + * M src/Makefile.am: + * M src/application/Makefile.am: + * M src/application/adapter/http/http.c: + * M src/application/adapter/http/update.c: + * A src/application/controller/authenticate/create.c: + * A src/application/controller/authenticate/delete.c: + * A src/application/controller/currentuser/read.c: + * A src/application/controller/randval/read.c: + * A src/application/controller/sessinfo/read.c: + * A src/application/controller/user/create.c: + * A src/application/controller/version/read.c: + * M src/http/Makefile.am: + * M src/http/request.c: + * A src/http/request/get_method_id.c: + * D src/http/request/has_valid_method.c: + * A src/router/Makefile.am: + * A src/router/route.c: + * A src/router/router.c: + * M src/taskrambler.c: + added a generic router. This is a REST router that maps + urls to specific functions which it tries to find via dlsym. + That way the only thing to do to get a new REST + functionality is to add a function that fits into the + namesheme. All existing functionality is moved accordingly + * M src/server/server.c: + remove not used variable + * M src/server/run.c: + change indenting + +2013-10-22 Georg Hopp georg@steffers.org + * M include/rbac/role.h: + small change to rbac role ... + this still is not really even started + * M TODO: + add note and thoughts about a distributed storage system + +2013-10-16 Georg Hopp georg@steffers.org + * M src/server/server.c: + if I have a socketNonblock method I should better use it. :D + * D include/cbufpool.h: + * D src/binarytree.c: + * D src/cbufpool.c: + * D src/configtest.c: + * D src/hash.c: + * D src/mmapfiletest.c: + * D src/mmapfiletest2.c: + * D src/rbtree.c: + * D src/rbtree2.c: + * D src/usertest.c: + * D src/uuid.c: + remove the moved files... :D + * A src/testers/binarytree.c: + * A src/testers/configtest.c: + * A src/testers/hash.c: + * A src/testers/mmapfiletest.c: + * A src/testers/mmapfiletest2.c: + * A src/testers/rbtree.c: + * A src/testers/rbtree2.c: + * A src/testers/usertest.c: + * A src/testers/uuid.c: + move test programs in separate folder + +2013-10-13 Georg Hopp georg@steffers.org + * M include/http/response.h: + * M src/http/response/asset.c: + * M src/http/worker/get_asset.c: + add expires header for static assets (right now 1 week + in the future) + 2013-10-09 Georg Hopp georg@steffers.org * A config/taskrambler.conf.in: add forgotten taskramble.conf.in diff --git a/Makefile.am b/Makefile.am index 88513cb..aba8dac 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,10 +1,5 @@ ACLOCAL_AMFLAGS = -I m4 -#bin_PROGRAMS = create_token -#create_token_SOURCES = base64.c createToken.c -#create_token_LDADD = src/libtoken.la $(LIBOBJS) -#create_token_CFLAGS = -Wall -I include - EXTRA_DIST = include certs assets myetc_DATA = config/mime.types \ @@ -43,6 +38,7 @@ nobase_trdata_DATA = assets/html/example.html \ assets/image/rambler-border-tr.jpg \ assets/image/rambler-logo-small.jpg \ assets/image/rambler-logo2-small.jpg \ + assets/image/gplv3-127x51.png \ assets/js/application.js \ assets/js/init.js \ assets/js/jquery.js \ diff --git a/NEWS b/NEWS index e69de29..03b3905 100644 --- a/NEWS +++ b/NEWS @@ -0,0 +1,14 @@ +2013-11-28 + +I am about to make a new release 0.1.8 of this. It took a long time since +the last release. Originally this was ment to implement some kind of RBAC +but now it improves user management to have resources (users) where +RBAC could be used on. + +So, in this version you got improved user management and an improved UI. + +I have new hardware and with this I got really impressive result from +ApacheBench. I can handle the simple /version/ request about 40000 times +a second on a new Core I5. This is more than double of the result on my +old Core2Duo, and we are still single threaded. + diff --git a/README b/README deleted file mode 100644 index a122cb3..0000000 --- a/README +++ /dev/null @@ -1,31 +0,0 @@ -$Id$ - -Actually this is some kind of server toolkit, also containing -a class and interface toolkit for C. -I use a gcc preprocessor extension to use empty variadoc -argument lists so actually this is gcc only code. - -This should become a server that has a dynamic time-sliced part -that updates an internal state all the time. -Clients might connect as they want and get some information -from the server. -The server should scale in two manners. -New instances should be able to handle connection and get -updates about the computed state. -Additionally new instances might hold their own state which -all other instances might update. - -In a first run the state might be something simple as a -matrix where every field hold a unique value. e.g. - - ------------- - |1|4|a|j|k|9| - ------------- - |1|4|a|j|k|9| - ------------- - |1|4|a|j|k|9| - ------------- - |1|4|a|j|k|9| - ------------- - -suggestion for timing: sigsuspend diff --git a/README b/README new file mode 120000 index 0000000..42061c0 --- /dev/null +++ b/README @@ -0,0 +1 @@ +README.md \ No newline at end of file diff --git a/README.md b/README.md index 15118a7..e87fd35 100644 --- a/README.md +++ b/README.md @@ -8,24 +8,29 @@ need any third party webserver to work. The backend is written completely in C while the frontend will be JavaScript, CSS and HTML. -When this is finished users will be able to connect to the server +Users will be able to connect to the server via their browsers, manage their tasks there and specify policies who else might see their tasks, track the time spend on a specific task, attach tasks to projects, getting reports about their work done, etc. -Right now for the taskmanagement stuff I think of a similar approach +For the taskmanagement stuff I think of a similar approach as [taskwarrior](http://taskwarrior.org/projects/show/taskwarrior) is going. This is an amazing tool and I really enjoy using it. I started this as an experiment to implement an HTTP server, then I learned about taskwarrior and thought, wouldn't it be great to have this functionality in a multiuser environment. -Right now, it is a single process HTTP server implementation that performs -not to bad. +Right now, this is a single process HTTP server implementation that performs +not to bad. And some application logic for user management. Every connection +is associated with a session and user can register, login and modify their +user data. -In the next version user will be able to create tasks and share them at -least on a basic level. +In the nearer future an role based access control system will be added. +Users will be able to add tasts, (for now just a text and maybe a date or +something) and they should be able to control who else might see a task. + +If this works reliable I will announce version 0.2. The main development page can be found [here](http://redmine.weird-web-workers.org/projects/taskrambler). @@ -34,7 +39,7 @@ INSTALLATION ------------ This can be installed via the usual configure, make, make install -cycle. +cycle. For gentoo users am ebuild is added under docs. ### API DOC @@ -47,52 +52,66 @@ neccessary. A patch is included under docs. gcov and lcov are needed to build these. -*make coverage-html* creates the converage reports. +The source has to be configured with *configure --enable-gcov*. +*make coverage-html* creates the converage reports then. -### PLAY AROUND -Any asset under assets could be exchanged. It should be possible to -change the main.html there and put additionally html files and images -under assets and everything should be deliverd. +USAGE +----- -Anyway, there are a few rules. +### RUNNING -* html assets will always be loaded from assets/html. -* all other assets are loaded directly from the assets directory. +Simply start the installed executable. +This will usually be found under */usr/local/bin/taskrambler* after +successfull build and installation. -So, right now this can be used as a HTTP server for static content -and without virtual hosts support. +When installed with the ebuild the executable will be */usr/bin/taskrambler*. +After the executable is stared you should be able to see the staskrambler +user interface with your browser by openening *http://localhost:11212/*. -USAGE ------ +In the upper right corner you can see session and user related information. -### RUNNING +### CONFIGURATION -Simply start the executable *src/taskrambler* after successfull build. -Currently this will stay in the foreground and does logging via syslog. +A first configuration file is installed in your etc folder under +*taskrambler/taskrambler.conf*. The syntax of that file is described in it. -### PORT +Currently there are only 5 settings that can be configured. -The server will listen on port 11212 for HTTP requests and on port 11213 -for SSL requerst. +* ldap_base: The base for the ldap Distinguished Name (DN) for user lookups. +* ldap_host: The ldap server to connect to. +* assets_dir: Defines where taskrambler will find its assets. +* runtime_dir: The place where the user and credential database files are + stored +* port: The port taskrambler should run on. -You can use telnet or simply start a browser and connect on localhost:11212. +### PORT + +Taskrambler will always connect to the port specified in the config for +HTTP connections. -This should show up a very simplistic page. -It should eneable you to start a session, get values from the server -or login. +A second socket will be opened on port+1 for SSL connections. ### LOGIN -You can't use the login without changing the code. It's implemented using -ldap and currently not configurable. You have to change the configuration -in the code and compile again. +Every user that can be authenticated either via LDAP or via taskramblers +own database can login via the login link in the menu. + +### SIGNUP + +It is possible to create a user account by clicking the signup link. +After a successfull signup you will be automatically logged in. + +### CHANGE USER DATA ### + +After a successfull login you have the ability to see your current account +informations and modify them via "my account" TESTING ------- -This comes with an incomplete unit test suite. +This comes with the start of a unit test suite. You can use *make test* to build and run the existent tests. ### REQUIREMENTS @@ -105,10 +124,5 @@ CONTRIBUTION I would really like to see some people possibly interested in this stuff. I think it contains some really interesting ideas. -Well, sadly i have to say that this is a spare time project. Documentation -is sparse and Tests too. - If you like to contribute anyway, make a fork, do your changes and generate -a pull request. - -I will look at these as soon as possible. +a pull request. Or simply contact me on georg@steffers.org. diff --git a/assets/html/_documentation.html.in b/assets/html/_documentation.html.in index a77e585..05f9527 100644 --- a/assets/html/_documentation.html.in +++ b/assets/html/_documentation.html.in @@ -23,6 +23,85 @@ here.
+This one took longer than expected and still does not contain what it +initially was meant to.
+ +My intention was to have at least some basic first RBAC in here, but +after some thinking about it I realized that it is difficult and meaningless +to create something as long as there is nothing to manage.
+ +Now a lot of work regarding the user management is done. Especially +there is the possibility to create user, modify them and in theory remove +them again. A lot of changes toop place and its best to categorize them.
+ +
diff --git a/assets/image/gplv3-127x51.png b/assets/image/gplv3-127x51.png
new file mode 100644
index 0000000..3e9136e
Binary files /dev/null and b/assets/image/gplv3-127x51.png differ
diff --git a/assets/js/init.js b/assets/js/init.js
index b1ce3ab..33d9d02 100644
--- a/assets/js/init.js
+++ b/assets/js/init.js
@@ -24,7 +24,9 @@ $(document).ready(function() {
}
$("#title").load("/_title.html");
- $("#main").load(asset);
+ $("#main").load(asset, function() {
+ $("#main").append('
')
+ });
menu.init(application);
$("#statusline").load("/_statusline.html", function() {
diff --git a/assets/style/common.css b/assets/style/common.css
index 15c4e90..79d4c4c 100644
--- a/assets/style/common.css
+++ b/assets/style/common.css
@@ -45,6 +45,14 @@ div#login-container {
z-index: 20;
}
+#gplv3 {
+ opacity: 0.3;
+ filter: alpha(opacity=30);
+ position: absolute;
+ right: 0px;
+ bottom: 0px;
+}
+
.hide {
top: -500px !important;
display: none !important;
diff --git a/assets/style/taskrambler.css b/assets/style/taskrambler.css
index d324dc6..bda84ad 100644
--- a/assets/style/taskrambler.css
+++ b/assets/style/taskrambler.css
@@ -302,6 +302,10 @@ div.border .br {
color: rgb(255,253,200);
}
+#main {
+ position: relative;
+}
+
#main a {
text-decoration: none;
font-weight: bold;
diff --git a/docs/taskrambler-0.1.8.ebuild b/docs/taskrambler-0.1.8.ebuild
new file mode 100644
index 0000000..88e8e6f
--- /dev/null
+++ b/docs/taskrambler-0.1.8.ebuild
@@ -0,0 +1,13 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="5"
+SLOT="0"
+
+DESCRIPTION="A HTTP server as a library and start of a task management tool."
+HOMEPAGE="http://taskrambler.weird-web-workers.org/"
+SRC_URI="http://redmine.weird-web-workers.org/attachments/download/16/taskrambler-0.1.8.tar.gz"
+
+LICENSE="GPL-3+"
+KEYWORDS="~amd64 ~x86"
diff --git a/src/taskrambler.c b/src/taskrambler.c
index 1df673f..b05a4c1 100644
--- a/src/taskrambler.c
+++ b/src/taskrambler.c
@@ -101,7 +101,7 @@ main()
setrlimit(RLIMIT_NOFILE, &limit);
init_signals();
- daemonize();
+ //daemonize();
shm = shm_open("/fooshm", O_RDWR|O_CREAT, S_IRWXU);
if (-1 == ftruncate(shm, psize)) {