Hi all,
being part of Commons Conservancy brought up yet another subject,
which is whether we should add a header with license information in
every file in the projects under idpy. This is not something done in
an abstract way, there is a specific format modelling this information
(see https://spdx.org/ and https://reuse.software/ - more specifically
https://reuse.software/practices/2.0/) Still, I find it problematic.
We want to open up the question to the wider community and consider
their thoughts on this. The forwarded message below is discussing this
subject. You can see the question we posed, the answer we got and my
comments. Feel free to tell us what you think on this.
---------- Forwarded message ---------
Date: Thu, 16 May 2019 at 09:56
> ---------- Forwarded message ----------
> Date: May 8, 2019, 8:15 AM -0700
>
> > Why does CC think having a single license file per project is
> > insufficient? Our thought is that if we can avoid adding a header to
> > every single file, that would be nice, esp. given we already have this
> > info in the license file and we have the Note Well.
>
>
> this is not just our opinion, but something that is an industry and
> community standard for legal compliance these days. When companies like
> Siemens, Samsung or Honeywell use some code in one of the hundreds or
> thousands of devices and systems in their product line, they need to be
> able to provide the correct license and a download of the exact version.
> This means machine readability too.
>
I've actually observed the opposite of that. Communities abandon the
"license in every file" model, and just use a single LICENSE file in
the root of the project. The LICENSE file contains license
information, that is, it is not a single license but it has exception
sections and so on.
> To quote from https://reuse.software/practices/2.0/ :
>
> Scroll to the section "2. Include a copyright notice and license in each
> file"...
>
> "Source code files are often reused across multiple projects, taken from
> their origin and repurposed, or otherwise end up in repositories where
> they are separate from its origin. You should therefore ensure that all
> files in your project have a comment header that convey that file’s
> copyright and license information: Who are the copyright holders and
> under which license(s) do they release the file?
>
Continuing from above, the standardization of package-management
formats and tools has helped exactly with that: to avoid distribution
of single files, and instead provide packages and modules. It is bad
practice and considered a hack to copy files. Nobody liked that model
and everyone is moving away; it is unstructured, it becomes
unmanageable and it will cause problems.
> It is highly recommended that you keep the format of these headers
> consistent across your files. It is important, however, that you do not
> remove any information from headers in files of which you are not the
> sole author.
>
> You must convey the license information of your source code file in a
> standardised way, so that computers can interpret it. You can do this
> with an SPDX-License-Identifier tag followed by an SPDX expression
> defined by the SPDX specifications."
>
> (the text goes on for a while after this, to clarify the point but this
> is the basic gist of it)
>
> There is a nice Python tool to check:
>
> https://github.com/fsfe/reuse-tool
>
> I hope this makes sense
>
Well, it does not make complete sense. We're talking about licensing a
project. A project is not just code; there are data files (html, xml,
yaml, json files), binary files (archives/zip, images, audio, video,
etc), text files (configs, ini-files, etc) all "not-code". How do you
mark those files? Does the LICENSE file need a license-header? The
json format does not define comments, how do you add a header there?
If a binary file does not get a license header, why should a file with
code get one?
I would expect there to be a way to have the needed information
unified. If the files themselves cannot provide this information it
has to be external; thus the LICENSE file. If someone is worried about
somebody else re-using single files that do not have license
information (a python file, a png image, etc) there is really nothing
you can do (the DRM industry has been trying to solve for a long time;
and still your best bet is "social DRM").
Since, we're developing on open source with a permissive license, even
if someone does that, should we be happy that someone is actually
using what we built or sad that the files they copied did not have a
license header? And if they include the license information of that
copied file in their project's LICENSE file, is this solved?
Having pointed these contradictions, I am thinking that the "license
in every file" model seems to be a step backwards. It is introducing
overhead and does not really solve the problem, while at the same time
it enables a culture of bad practice (copying files around).
Cheers,
--
Ivan c00kiemon5ter Kanakarakis >:3
Hello everyone,
there has been a report on incident-response at idpy.org about a security
issue in PySaml2.
Alexey Sintsov and Yuri Goltsev from HERE Technologies reached out and
reported a XML Signature Wrapping (XSW) vulnerability. The issue
affects responses with signed assertions. PySaml2 can be tricked to
think that an assertion had been signed and use the assertion
information, when in reality the Signature points to another part of
the xml document that is controlled by another party.
The issue was assigned CVE-2020-5390 and is now fixed in the latest
pysaml2 release.
The relevant code commit that fixes is the issue:
https://github.com/IdentityPython/pysaml2/commit/5e9d5acbcd8ae45c4e736ac521…
Release v5.0.0 contains more changes, including:
- Add freshness period feature for MetaDataMDX
- Fix ipv6 validation to accommodate for addresses with brackets
- Fix xmlsec temporary files deletions
- Add method to get supported algorithms from metadata
- Add mdstore method to extract assurance certifications
- Add mdstore method to extract contact_person data
- Start dropping python2 support
Pointers to the release with changelog and more information, below:
- the relevant release commit:
https://github.com/IdentityPython/pysaml2/commit/f27c7e7a7010f83380566a219f…
- the github release:
https://github.com/IdentityPython/pysaml2/releases/tag/v5.0.0
- the pypi package:
https://pypi.org/project/pysaml2/5.0.0/
+ + + + + + + +
In more detail, regarding the XSW vulnerability:
libxml2 follows the xmldsig-core specification. The xmldsig
specification is way too
general. saml-core reuses the xmldsig specification, but constrains it to use of
specific facilities. The implementation of the SAML specification is
responsible to
enforce those constraints. libxml2/xmlsec1 are not aware of those
constraints and thus
process the document based on the full/general xmldsig rules.
What is happening is the following:
- xmldsig-core allows the signature-information and the data that was
signed to be in
different places. This works by setting the URI attribute of the
Reference element.
The URI attribute contains an optional identifier of the object
being signed. (see
"4.4.3 The Reference Element" --
https://www.w3.org/TR/xmldsig-core1/#sec-Reference)
This identifier is actually a pointer that can be defined in many
different ways; from
XPath expressions that need to be executed(!), to a full URL that
should be fetched(!)
in order to recalculate the signature.
- saml-core section "5.4 XML Signature Profile" defines constrains on
the xmldsig-core
facilities. It explicitly dictates that enveloped signatures are the
only signatures
allowed. This mean that:
* Assertion/RequestType/ResponseType elements must have an ID attribute
* signatures must have a single Reference element
* the Reference element must have a URI attribute
* the URI attribute contains an anchor
* the anchor points to the enclosing element's ID attribute
xmlsec1 does the right thing - it follows the reference URI pointer
and validates the
assertion. But, the pointer points to an assertion in another part of
the document; not
the assertion in which the signature is embedded/enveloped. SAML
processing thinks that
the signature is fine (that's what xmlsec1 said), and gets the
assertion data from the
assertion that contains the signature - but that assertion was never
validated. The
issue is that pysaml2 does not enforce the constrains on the signature
validation
facilities of xmldsig-core, that the saml-core spec defines.
The solution is simple; all we need is to make sure that assertions
with signatures (1)
contain one reference element that (2) has a URI attribute (3) that is
an anchor that
(4) points to the assertion in which the signature is embedded. If
those conditions are
met then we're good, otherwise we should fail the verification.
--
Ivan c00kiemon5ter Kanakarakis >:3
Hi Leif,
I added 2 pipes to buildin.py:
- publish_html creates static HTML views of IDPs and SPs, using XSLT based on Peter Schober’s alternative to MET;
- publish_split: similar to store, but added validUntil and creates signed XML-file per EntityDescriptor. This can be consumed dynamically by ADFS in an IDP role.
I put it directly into buildin.py because it shares some code with the sign pipe. Is this viable from your PoV - if yes, I would make an PR.
Cheers, Rainer
Sorry for the delay.
*Idpy meeting 20 February 2024*
Attendees: Johan W., Johan L., Alex Perez-Mendez, Shayna, Ivan, Roland,
Mikael Frykholm, Björn Mattsson
0 - Agenda bash
1 - Demo
- Roland gave a demo of the wallet ecosystem he has built following the
Italian profile.
- The profile from Italy:
https://italia.github.io/eudi-wallet-it-docs/versione-corrente/en/
- The proposed generalized version (regardless of the country):
https://github.com/WalletInteroperabilityLab/eudi-wif
- We did not record Roland's live demo, but he has recorded a similar
demo at https://youtu.be/pQk0pEzKPQo?si=NR2lk_2ckfQBwZ7H
2 - Project review
a. General -
b. OIDC libraries - https://github.com/IdentityPython (idpy-oidc,
JWTConnect-Python-CryptoJWT, etc)
- Roland has been writing a description of the steps required to stand
up a federation using his software, and how to add another entity to the
federation, different topologies of the federation, and so on. He has a
first cut available.
- Björn Mattsson mentioned that they have been using this document to
try and get a federation up on the SWAMID side (I'm sorry, I missed the
specific project name this was for), building a Docker image to run the
different parts. They will provide feedback to Roland about using it this
way.
- based on federvice repo (https://github.com/rohe/fedservice)
- Can also be used in Core AAI, educational use case
- AARC people are also looking at this to use cross-infra exchange of
tokens. OIDC but using the federations to build trust. A client
can talk to
a resource server from another domain because that server talks to an
issuer that is part of a federated network, which trusts the
issuer of the
client.
c. Satosa - https://github.com/IdentityPython/SATOSA
- Matthew has put up PR -
https://github.com/IdentityPython/SATOSA/pull/454
- github actions added to workflow (continuous integration): clones
the repo, sets up python and anything else needed, and runs
linting with
pre-commit hooks to include flake8
- also runs basic yaml and whitespace cleanup
- developer can install precommit hook - then any got commit
command will do flake8 checks as project has defined
- same checks get run by github actions if developer forgets or
chooses to not install pre-commit
- currently flake8 config is in tox.ini and setup.cfg - that
should be stripped and flake8 config should be put in its own file
- goal: to get everything that was done in travis into github
actions (including syntax checks, style checks using isort and python
black, test phases/pytest, deploy to pypi, etc). Would like
to also add
automated container image updates for SATOSA eventually. No
credentials
need to be hardcoded when interfacing with pypi (when we get to that).
- There should be discussion on whether to merge things in pieces
or in one big PR. It is possible to bypass pre-commit hooks and github
actions will only put a "this doesn't work" badge on commits
that don't the
match flake8 checks, for this particular PR. Next the isort and python
black would probably be best to do in one PR that touches all
files, but
may affect other PRs that are out there (ask developers to rebase?).
d. pySAML2 - https://github.com/IdentityPython/pysaml2
e. Any other project (pyFF, djangosaml2, pyMDOC-CBOR, etc)
2 - AOB
*Idpy meeting 6 February 2024*
Attendees: Johan W, Johan L, Shayna, Roland, Hannah, Matthew E.
0 - Agenda bash
1 - Project review
a. General -
b. OIDC libraries - https://github.com/IdentityPython (idpy-oidc,
JWTConnect-Python-CryptoJWT, etc)
- From the TIIME conference, it is clear that the wallet project will be
used in different pilots, and different requirements will be handled
through configuration
- Roland will put out one instance of this project soon, including
federation pieces and the credential issuer.
- There is a Greek wallet implementation - wwwallet - they are trying
to get it to work together with Roland's project. They had to add quite a
bit of functionality to their implementation.
- Another part of the wallet ecosystem is the verifier or relying
party - the spec is very complex and not stable yet. No one wants to
implement it since it will probably change. Some people have come up with
something much simpler. Roland will implement something like this to be
able to verify what is in the wallet.
- Real wallet examples: EC for EU project world package 5 - social
security - Denmark, Germany, Austria? - pilot for issuing
credentials. The
approaches were very different in discussions - Roland more
concerned about
how the information gets transferred securely; the other parties more
concerned about what information to distribute.
- They also brought up the problem of when the person who is
described in the wallet is not the person who holds the
wallet. Parent /
child for example. This is not handled in the spec currently.
- For idpy-oidc: Roland has a PR he would like reviewed by
Giuseppe and Ivan - then will make a new release
- When you post an authorization request you can specify who the
audience of the token is, but the idpy implementation was not
handling that
correctly. That fix will be part of the new release.
c. Satosa - https://github.com/IdentityPython/SATOSA
d. pySAML2 - https://github.com/IdentityPython/pysaml2
e. Any other project (pyFF, djangosaml2, pyMDOC-CBOR, etc)
2 - AOB
- idpy board meeting took place at the TIIME conference.
- There is discussion on having more than one person to be responsible
for each of the projects / packages.
- Roland would like to switch roles to be an adviser rather than
responsible for the projects he is working on.
- Tentatively planning a demo from Roland at the meeting on 20th
February