Wim Taymans
95b3bd4e0c
tests: simplify tests
...
Client settings are now disabled by default so we don't need an auth
module to disable them.
2013-07-15 16:48:37 +02:00
Wim Taymans
f18f2619e1
auth: add default authorizations
...
When no auth module is specified, use our table of defaults to look up the
default value of the check instead of always allowing everything. This was
we can disallow client settings by default.
2013-07-15 16:47:07 +02:00
Wim Taymans
5b77c9f406
README: update readme
2013-07-15 16:05:02 +02:00
Wim Taymans
7064b9fda7
thread-pool: add more docs
2013-07-15 15:25:00 +02:00
Wim Taymans
0ce4d4d5c7
thread-pool: fix race in thread reuse
...
If we try to reuse a thread right after we made it stop, we end up using a
stopped thread. Catch this case and only reuse threads that are not stopping.
2013-07-15 14:50:38 +02:00
Wim Taymans
3fe1096fd1
server: add small debug
2013-07-15 14:50:26 +02:00
Wim Taymans
15db094d85
client: fix test
...
Add some permissions to media so we can use the auth and enable
client settings.
2013-07-15 11:58:58 +02:00
Wim Taymans
38d91a2bf8
client: support pushed context in handle_request
...
If we already have a pushed state, reuse it and add our own things. This makes
it easier to write tests.
2013-07-15 11:57:49 +02:00
Wim Taymans
7db2f9f3cf
auth: don't auth on methods
...
Don't authorize on methods anymore but on the resources that we
try to access, this is more flexible.
Move the authorization checks to where they are needed and let the
check return the response on error.
2013-07-15 11:56:06 +02:00
Wim Taymans
692cbc1364
mount-points: add some debug
2013-07-15 11:51:34 +02:00
Wim Taymans
5ce4dd7925
tests: almost fix test
2013-07-12 17:26:55 +02:00
Wim Taymans
9fe107a96a
auth: let the auth module check client_settings
...
Let the auth module decide if client settings are allowed for the
current client.
2013-07-12 17:07:53 +02:00
Wim Taymans
c4db302559
token: add method to check boolean permission
2013-07-12 17:06:37 +02:00
Wim Taymans
b8c5aa3a6b
token: simplify token constructor
...
Use variable arguments to make easier API.
2013-07-12 16:36:05 +02:00
Wim Taymans
67d0fbc048
media-factory: add convenience API for factory
2013-07-12 16:17:57 +02:00
Wim Taymans
facc91a942
permissions: simplify API a little
...
Avoid passing GstStructure in the add_role method, use varargs instead
to construct the structure behind the scenes. We can then also use the
structure name as the role and simplify some more logic.
2013-07-12 16:17:15 +02:00
Wim Taymans
a6a8293595
auth: fix typo
2013-07-12 16:01:14 +02:00
Wim Taymans
5cf75e64af
auth: handle unauthorized response
...
Move handling of the unauthorized response to the auth module, it can add
the appropriate headers to request authorization for the required method
much better than the client.
2013-07-12 15:19:29 +02:00
Wim Taymans
7532de687a
client: allow for sending any message, not only requests
...
Change the _send_request() method to _send_message() so that we
can both send requests and replies.
2013-07-12 15:13:48 +02:00
Wim Taymans
9a09d98e6d
docs: fix docs
2013-07-12 14:10:13 +02:00
Wim Taymans
4b2e6d88b3
auth: move TLS handling to auth module
...
Remove the TLS settings on the server and move it to the auth module because
that is where security related bits go.
2013-07-12 12:41:52 +02:00
Wim Taymans
a1e96c2269
client: add state push/pop
2013-07-12 12:38:54 +02:00
Wim Taymans
e1628a0515
client: add connection to state
2013-07-12 12:37:25 +02:00
Wim Taymans
f6674d5c10
mount-points: fix debug
2013-07-11 20:45:11 +02:00
Wim Taymans
8200efbbd0
tests: fix media test
2013-07-11 17:28:17 +02:00
Wim Taymans
7f8fdbc453
thread-pool: we don't require a state
2013-07-11 17:28:04 +02:00
Wim Taymans
c2d4b79b69
server: let context ref the server
...
So that we don't risk losing the server object early anc crash.
2013-07-11 17:18:58 +02:00
Wim Taymans
868a7a5a93
tests: fix client test
2013-07-11 17:05:00 +02:00
Wim Taymans
0b3644a21b
docs: improve docs
2013-07-11 16:57:14 +02:00
Wim Taymans
8b4c9570fa
session-pool: make vmethod to create a session
...
Make a vmethod to create a sessions so that subclasses can create
custom session objects
2013-07-11 16:28:09 +02:00
Wim Taymans
d357fc55af
docs: more updates
2013-07-11 12:24:33 +02:00
Wim Taymans
ccceb1de11
docs: update docs
2013-07-11 12:18:26 +02:00
Wim Taymans
2fdc6ef88a
configure: compile cgroup example conditionally
...
Only compile the cgroup example when we have libcgroup
2013-07-11 10:28:06 +02:00
Wim Taymans
5c6bb3052f
examples: add cgroups example
2013-07-10 20:57:12 +02:00
Wim Taymans
e788a9ca60
tests: fix compilation
2013-07-10 20:55:03 +02:00
Wim Taymans
6f5a82aed3
thread-pool: fix vmethod invocation
2013-07-10 20:48:47 +02:00
Wim Taymans
8cec0f8a46
thread-pool: store thread type in thread
2013-07-10 20:48:18 +02:00
Wim Taymans
4e9c4d8bb7
client: pass thread from pool to media _prepare
...
Get a thread from the configured threadpool and pass it to the prepare method of
the media.
2013-07-10 17:09:27 +02:00
Wim Taymans
d1e4baab6c
media: Accept a thread in _prepare
...
Remove out own threadpool handling and use the provided thread and
maincontext for the bus messages and the state changes.
2013-07-10 17:08:14 +02:00
Wim Taymans
01b921e8a6
server: configure client thread pool
2013-07-10 17:07:13 +02:00
Wim Taymans
00997d956f
client: add method to configure thread pool
2013-07-10 17:06:36 +02:00
Wim Taymans
27917f4ef3
server: use thread pool
...
Use the thread pool instead of doing our own thing.
2013-07-10 17:02:58 +02:00
Wim Taymans
25269c7b1a
thread-pool: add object to manage threads
...
Add an object to manage the client and media threads.
2013-07-10 16:47:43 +02:00
Wim Taymans
1a0c7051aa
auth: debug authorization check
2013-07-10 15:28:35 +02:00
Wim Taymans
c4c9c873b8
media: start media pipeline in context
...
Start the media pipeline in the provided context (or our default one
when NULL). This makes sure that we run the bus thread in this context and that
all media threads are children of this context.
2013-07-09 20:44:51 +02:00
Wim Taymans
ca28a46600
factory: pass permissions to media by default
2013-07-09 16:38:39 +02:00
Wim Taymans
16cfb7b8c0
test: add permissions to auth test
...
Ass some permissions to the media factory in the test.
2013-07-09 16:09:07 +02:00
Wim Taymans
d7dec33328
auth: simplify auth checks
...
Remove client from methods, it's now in the state
Perform the check specified by the string, use the information from the
thread local context.
2013-07-09 16:04:35 +02:00
Wim Taymans
c9d6455ad3
client: add state to current thread
...
Add the client to the ClientState object.
Place the ClientState on the current thread.
2013-07-09 16:01:29 +02:00
Wim Taymans
0499a1ec7d
media: make it possible to set permissions
...
Make it possible to set permissions on media and media factory objects
2013-07-09 14:33:43 +02:00