<!-- Kamailio Pull Request Template -->
<!-- IMPORTANT: - for detailed contributing guidelines, read: https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md - pull requests must be done to master branch, unless they are backports of fixes from master branch to a stable branch - backports to stable branches must be done with 'git cherry-pick -x ...' - code is contributed under BSD for core and main components (tm, sl, auth, tls) - code is contributed GPLv2 or a compatible license for the other components - GPL code is contributed with OpenSSL licensing exception -->
#### Pre-Submission Checklist <!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply --> <!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above--> <!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list --> - [X] Commit message has the format required by CONTRIBUTING guide - [X] Commits are split per component (core, individual modules, libs, utils, ...) - [X] Each component has a single commit (if not, squash them into one commit) - [X] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change - [ ] Small bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist: <!-- Go over all points below, and after creating the PR, tick the checkboxes that apply --> - [X] PR should be backported to stable branches - [X] Tested changes locally - [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description <!-- Describe your changes in detail --> This module uses libstirshaken to implement STIR-Shaken authentication and verification functions (STI-AS/VS). It allows for easy verification of a SIP call containing PASSporT wrapped into SIP Identity Header using a specific certificate, or a specific key, or by performing complete check on PASSporT including downloading certificate referenced in it's x5u header, and optionally checking it against trusted root certificates (X509 cert path check). Certificates may be cached and loaded from disk.
Example usage:
loadmodule "stirshaken" modparam("stirshaken", "as_default_key", "/path/to/key")
modparam("stirshaken", "vs_verify_x509_cert_path", 1) modparam("stirshaken", "vs_ca_dir", "/path/to/ca") modparam("stirshaken", "vs_cache_certificates", 1) modparam("stirshaken", "vs_cache_dir", "/tmp/cert_cache") modparam("stirshaken", "vs_cache_expire_s", 90)
request_route { (...) stirshaken_add_identity("https://sp.com/sp.pem%22;, "B", "+44100", "+44200", "ref"); (...)
request_route { (...) stirshaken_check_identity(); (...) You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2679
-- Commit Summary --
* modules: Add stirshaken module
-- File Changes --
A src/modules/stirshaken/Makefile (28) A src/modules/stirshaken/stirshaken_mod.c (972)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2679.patch https://github.com/kamailio/kamailio/pull/2679.diff
Thanks for this contribution!
First thing that I noticed is the missing of the `doc/` folder with the docbook documentation files for the module. You can look at `secsipid` module, probably you can copy over, rename the files to match the module name as well as the content to reflect what the module provides.
@piotr-gregor pushed 1 commit.
07d29d5fb0fd77dc96b95a080a95dac6ac859d91 modules: Add stirshaken module
@piotr-gregor pushed 1 commit.
011177fc990860d54a8dbe85f296dfd437e25ae4 stirshaken: add doc
Thanks!
Merged #2679 into master.
@piotr-gregor: the module was merged, a group for it was created in `src/Makefile.groups`, so the module is not going to be compiled by default, having dependency on `libstirshaken` -- it can be compiled and installed with:
``` make include_modules="stirshaken" cfg make all make install ```
During development, another way to compile it in the source code tree to check for errors, etc., is:
``` make modules modules=src/modules/stirshaken ```
Soon you will get an invitation for write access to Kamailio github repository, so you can push commits to `stirshaken` module directly. Of course, you can also use pull requests if you want other developers to review your changes.
Anyhow, for changes that you want to push to other components (core, internal libraries, other modules) it is strongly recommended to do pull requests. As a last remark here, do not forget about contributing guidelines and formatting the commit message, because we use commit history for building changelogs for releases:
* https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md#con...
This is great! Thank you very much Daniel!