Age | Commit message (Collapse) | Author | Files | Lines |
|
Add template files for gitlab
Bug-AGL: SPEC-4474
Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Change-Id: I21a6bd78084716648cc184ec3485ce53dae119b6
|
|
Changes for compiling with gcc 11.x:
- g++ now seems to instantiate duplicate entries for the set member
function in the contextclass template class in binding-wrap.hpp.
The use of a closure as a default argument value seems to be the
culprit, as it seems there are longstanding issues with respect to
using closures like that and resulting symbol names (i.e. the use
of a closure isn't necessarily recognized as generating unique
instantiations). In theory, C++17 should explicitly allow this
when the closure has no captures, but bumping up to -std=gnu++17
did not fix the issue. To avoid it, replace the closure usage
with a private static member function.
- In afb-hook.c, tweaked the ignoring of the writev return code to
make the stricter checking in gcc 11 happy.
- In decode_base64 in wrap-json.c, initialize u16 as gcc now seems
to miss that it will be initialized on the first loop iteration.
Bug-AGL: SPEC-3819
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: I8876db196b46cc35ecd2798e20d5ec3425df865e
|
|
Some architecutres (such as RISC-V) require that atomics be specifically
linked to avoid build failures. Ensure that this is the case.
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Change-Id: Iad543232a6547b197f04100e996e6200c9f803ce
|
|
afb_event_drop is not supported in appfw v3, use afb_event_unref to
replace it.
Bug-AGL: SPEC-2745
Change-Id: I6f2a1148c420fb9964eb94e5ae012be563d722e6
Signed-off-by: Li, Xiaoming <lixm.fnst@cn.fujitsu.com>
|
|
Bug-AGL: SPEC-3476
Signed-off-by: Zhang Nan <zhangnan.fnst@cn.fujitsu.com>
Change-Id: Icafb76c1cee6fb85e4f5fb95badb521fb96d45d5
|
|
The include of <string> was missing in the C++ header.
This produced errors on some builds.
Bug-AGL: SPEC-3358
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Change-Id: I928e8ab267d27710177a7a314ea8b8cdfa83e2f3
|
|
When the client reconnected, it used the wrong type
and reconnected as server leading to unexpected
continuations.
Bug-AGL: SPEC-3272
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Change-Id: I1baac1b65014e840acb6ecedb501fc14abc17ed6
|
|
Address of the function is much better than adress of the
pointer in the stack.
BUG-AGL: SPEC-3220
Change-Id: I860b66ac7b8581af5229201556333edcde1f089f
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
The id sent was 16 bits in one case and 32 bits in the other
Bug-AGL: SPEC-3220
Change-Id: If38c99b2d903b6851ff4682e1f8d771aec7ddcee
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
The bug is trivial and was revealed by testing.
A copy paste bug...
Bug-AGL: SPEC-3220
Change-Id: I65ed8a3a3e377338fd41a2b64b8698f421bbacb9
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
Address sanitizers is expecting shared objects loaded
without the flag RTLD_DEEPBIND. This can be achieved
by setting the environment variable AFB_NO_RTLD_DEEPBIND
to the value 1 (exactly).
This implies that the binder takes care of not clashing
the namespaces by defining the symbol afbBindingV3root
in both environment: the binder and the bindings.
Bug-AGL: SPEC-3040
Bug-AGL: SPEC-3162
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Change-Id: Ic064590178d4cf8b34b939e4c9ecd587668f71b8
|
|
This updates the gitreview file in the project
.
Change-Id: I74fa71680335cff27e3bf42518026c09ea47f527
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
|
|
The case of returning NULL is not tested in `globset_add`.
It is safe because `grow` is called first and then `search`
never returns a NULL pointer.
Bug-AGL: SPEC-3134
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Change-Id: I21e8ba3a6c8202a920c6784f4d61376450b9a063
|
|
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Change-Id: I01a566a693b8ec6239209c9323ae4ff15a07f737
|
|
The direct connection URI was expecting a slash after the port
for "tcp:" URI. This slash is not needed because it does not
carry any meaning. This change implements the ability to set
or not the path of URI.
Bug-AGL: SPEC-3094
Change-Id: I3d4c350f4e917759cbf82ccc0d261aa420f6f88a
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
Fix the logic of unsubscribing to events. It
was not possible before to implment it without
tracking every session and context. It was not
done because of the required complexity.
This implementation ensures that unexpected
events lead to a removal of the listener from the
list of watchers of the events.
The management of the list of watchers is reworked
to free unused memory.
Bug-AGL: SPEC-3069
Change-Id: Ie67372adbde9dcb9dc6c5c2738111d22609e7256
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
Some more improvement on the road of the following bug:
Bug-AGL: SPEC-3069
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Change-Id: I5ad6439fa6051566ab2caf271345eda1efcef398
|
|
This new message allows to revoke an event no more
expected or listened.
Bug-AGL: SPEC-3069
Change-Id: I71945e322276f29b01b628bdf43d75599b521fc3
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
Some more comment and naming improvement on the road
of the following bug:
Bug-AGL: SPEC-3069
Change-Id: I001ccfba2ea59604d217feb6afe3e5a313f3fbaf
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
The event name is given at second position,
preserving existing code and making its
use optionnal.
Bug-AGL: SPEC-3069
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Change-Id: Ieeed1762977b990c139d56c4d78e2b539d6927c6
|
|
When using dynamically created/destroyed API, the binder
might miss to start some apis. This fixes that issue by
enforcing to restart from beginning until all is initialised.
Bug-AGL: SPEC-3087
Change-Id: I4dd8c60c8465419a46132bf9f6deffa11e172e2a
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
New line markers were missing.
Bug-AGL: SPEC-3066
Change-Id: I4f1cf990edfb7772480ba658b6eda94bdd7e0289
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
Management of tokens had a big bug, due to insufficent testing.
This fixes the issue that leaded to memory crashes.
BUG-AGL: SPEC-3066
Change-Id: If967ec58ed04dc715d255a5e7c2196133ce3ec4a
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
Since:
- introduction of interface to set the
listening port(s) and address(es)
- use of nss-localuser for discriminating
binders
there is no more strict need for exporting
the port and substituting it. So the
substitution is make only if needed.
Since removal of token generation, there is no
more need to propoagate any token.
The two possibilities are kept for being used
whene needed and to ensure sweet transition.
Bug-AGL: SPEC-2968
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Change-Id: I1d2b4d765f244e46de3071baddd8b3d0817b9436
|
|
This change allows to specify interfaces to serve
explicitely.
By default the option --port=PORT lead to serving
interface of specification "tcp:*:PORT". Meaning
that all interfaces are listened.
This is intended to be used with localuser family
of hostnames.
Bug-AGL: SPEC-2968
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Change-Id: I3fb2a77a5c03dd4c2118ebe3267794f79bfc0262
|
|
This is a basic improvement for allowing simple
option setting when uri are to be written.
It allows to set contextually the default scheme.
Bug-AGL: SPEC-2968
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
Change-Id: I9d7be96743c47b3dd788a35b0b3642387613bacb
|
|
Without relaxing constraint, it is impossible to alias
2 directory contents for the same prefix. Relaxing it
is needed for implementing ".well-known" interface.
Bug-AGL: SPEC-2968
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
Change-Id: I339699bbe66ed3df74ed4ac92344646339e5f2ad
|
|
AFB.js was present with 2 different versions.
This make it unique.
Bug-AGL: SPEC-2968
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Change-Id: Iee7a5a08fa1457d572000e42da4147c9fa5944b8
|
|
Access to permission database is better handled
in a separate file. It will afterward evolve to
integrate cynagora.
Bug-AGL: SPEC-2968
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Change-Id: Iebcd4e227e3e6c318029926499afb9d41d3f72c7
|
|
The messages prompted when the supervisor is
absent were of to high priority.
Bug-AGL: SPEC-2968
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Change-Id: Ic53a3039c2d3ed5be0138ec3215d58e27758a79c
|
|
Validation of token is now linked to backend permission
database.
Bug-AGL: SPEC-2968
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Change-Id: I30b049f92b8324740abecbb9539f7413ad55f7ec
|
|
The split between context and credentials
in requests was somehow artificial and awkward.
This change move the credentials to the context
and removes as many references to credentials
as possible in favor of working on contexts.
Change the value returned by afb_auth_check to be 1
if validated, 0 or less than zero if not validated.
Bug-AGL: SPEC-2968
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Change-Id: I979dc841e03247e126e3fa8433a1cc0d4108adf0
|
|
The previous policy for websocket was to enforce them
to present a valid token when establishing. This policy
is removed because the Websocket API of javascript doesn't
provide a way to set the Bearer token in the HTTP header
of the negociation (a big miss in my opinion).
But because the new policy of token logic is to check
the token at each request, it is not more needed to check
it at establishment.
Bug-AGL: SPEC-2968
Change-Id: I2941757492a27a2eed14e26fbb411330ab4aa8bc
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
This change factorize code for version V1 of bindings
and centralizes management of authorisations in a
single place.
Bug-AGL: SPEC-2968
Change-Id: I6ad95d5bfa0d85dbb6d2060fc9ebca08b68eb4e9
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
The standard error text are used to return standard
HTTP error codes.
Bug-AGL: SPEC-2968
Change-Id: Ic70e7982b1e05a1830cfa4e54813227621192ae2
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
Change internals of the protocol WSAPI for the following
rationale:
1. Enforce specific declaration and transmission of session
identifiers and of access tokens.
2. Lower the size of identifiers to be 16 bits.
3. Introduce protocol versionning through a mechanism of offer/set.
The main purpose of that change is to optimize the count of data
transmitted. It manages as best as possible the transmission of
access tokens the less possible times. Same for sessions that
the chage was transmitted at each call.
Bug-AGL: SPEC-2968
Change-Id: If0a22b86627ead35a410e51c1028025c5b02c38f
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
Because remote apis describe themselves asynchronousely,
it is better to have asynchronous describe api.
Bug-AGL: SPEC-2968
Change-Id: I52b4dab697f229ad01ea2b73d6b8dee22d507912
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
16 bits are enough
Bug-AGL: SPEC-2968
Change-Id: I0e8708c1d6a3934a342721a6ce5edb4676df6d1b
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
These maps will shortly be used by protocol to handle
tokens/sessions/events.
Bug-AGL: SPEC-2968
Change-Id: Iadef7d6e01c8ef021516749524b10ccc1abec340
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
Tokens are no more managed by the binder.
Bug-AGL: SPEC-2968
Change-Id: Idf1c38105f8ede82cd0ed43aeae3e8e69b9845a3
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
Also, improve readability and memory footprint
Bug-AGL: SPEC-2968
Change-Id: I90104fb19a44e2810b92bef51d774acf734fd90f
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
Tokens are now object used in the context.
Bug-AGL: SPEC-2968
Change-Id: I107d31732202b7b1172afaf09f3a52470f050d7c
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
Tokens are no more related to sessions.
Each request provides a token. In the case of websockets or
connected link, the context can record the token.
Bug-AGL: SPEC-2968
Change-Id: I1442b0422584c5a5b860ddb826518b0e673612f9
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
uuid is available in cookies and through
a call to monitor/session
Bug-AGL: SPEC-2968
Change-Id: I72912f3dc7985cca09e77c952e416b608711abbe
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
The token is no more generated by the binder
Bug-AGL: SPEC-2968
Change-Id: I43f66c7613b42d33058e167b831a93b2112d3b9e
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
The token is no more generated by the binder
but by some external component.
Bug-AGL: SPEC-2968
Change-Id: I2c6221034272ab097e21e7727e4840b6b47bd0dc
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
As specified by OAuth2 protocols, the access token can be
passed as a POST/GET parameter of name 'access_token'.
Bug-AGL: SPEC-2968
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Change-Id: I0e02e6fd0d53dad6de994d4482350fe42ecfce48
|
|
When the connection can't occur, the output is not correct.
Bug-AGL: SPEC-2975
Change-Id: I9cc185329ddccb00f2544dd7b17841b108cc2c81
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
The coverage test was broken. This restores it.
Also add a simple build script that covers most
of the code by default.
Bug-AGL: SPEC-2974
Change-Id: I4fc5a0ba54195738405460a04f985bb67b81b5df
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
For further optimizations, the token is represented
by a specific structure.
Bug-AGL: SPEC-2968
Change-Id: I3d46a12c8c16809c6cc1d543fa2e6309927ed84d
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|