Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migration to fido2 #31

Merged
merged 19 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
703a6d2
migration to fido2
piotrbartman Oct 23, 2022
dae0c34
migration to fido2: CI
piotrbartman May 6, 2023
0ef2268
migration to fido2: simplyfy from_bytes
piotrbartman May 8, 2023
847b3aa
migration to fido2: fido2 in ci/requirements
piotrbartman May 8, 2023
d1dd61f
migration to fido2: mypy
piotrbartman May 8, 2023
363fbee
migration to fido2: drops deprecated package 'distutils.version'
piotrbartman May 8, 2023
758bf75
migration to fido2: renaming
piotrbartman May 13, 2023
4c41fab
migration to fido2: add docs
piotrbartman May 20, 2023
0b5750a
migration to fido2: trim allowlist
piotrbartman May 20, 2023
da97bed
migration to fido2: update architecture
piotrbartman May 21, 2023
2658a58
migration to fido2: pylint + changelog update
piotrbartman May 21, 2023
912ead0
migration to fido2: change the message to more informative
piotrbartman May 22, 2023
46ee032
migration to fido2: just raise error for CTAP2 request for CTAP1 device
piotrbartman May 22, 2023
00603bc
migration to fido2: backward compatible policies names
piotrbartman May 29, 2023
4735a61
migration to fido2: backward compatible service running
piotrbartman May 29, 2023
2eefd1e
migration to fido2: fix compatibility for legacy devices
piotrbartman Jul 8, 2023
62c7f5b
migration to fido2: fix NotImplementedError when there is no device
piotrbartman Jul 12, 2023
b30819b
migration to fido2: wait for the user to insert the key
piotrbartman Jul 12, 2023
2075ea3
migration to fido2: better error message
piotrbartman Jul 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__pycache__
qubesu2f.egg-info/
qubesctap.egg-info/
build/
dist/
pkgs/
Expand Down
24 changes: 24 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,27 @@ include:
project: QubesOS/qubes-continuous-integration
- file: /r4.2/gitlab-vm.yml
project: QubesOS/qubes-continuous-integration

checks:tests:
stage: checks
variables:
PYTEST_ADDOPTS: "--color=yes"
before_script: &before-script
- "PATH=$PATH:$HOME/.local/bin"
- sudo dnf install -y python3-pytest python3-coverage
- pip3 install --quiet -r ci/requirements.txt
script:
- ./run-tests.sh
after_script:
- "PATH=$PATH:$HOME/.local/bin"
- ci/codecov-wrapper

checks:pylint:
before_script:
- sudo dnf install -y python3-mypy
- pip3 install --quiet -r ci/requirements.txt
- mypy --install-types --non-interactive
script:
- python3 -m pylint --rcfile=.pylintrc qubesctap
- mypy qubesctap
stage: checks
54 changes: 0 additions & 54 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@ unsafe-load-any-extension=no
# run arbitrary code
extension-pkg-whitelist=

# Allow optimization of some AST trees. This will activate a peephole AST
# optimizer, which will apply various small optimizations. For instance, it can
# be used to obtain the result of joining multiple strings with the addition
# operator. Joining a lot of strings can lead to a maximum recursion error in
# Pylint and this flag can prevent that. It has one side effect, the resulting
# AST will be different than the one from reality. This option is deprecated
# and it will be removed in Pylint 2.0.
optimize-ast=no


[MESSAGES CONTROL]

Expand All @@ -66,10 +57,7 @@ confidence=
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=
bad-whitespace,
bad-continuation,
locally-disabled,
locally-enabled,

[REPORTS]

Expand All @@ -78,12 +66,6 @@ disable=
# mypackage.mymodule.MyReporterClass.
output-format=colorized

# Put messages in a separate file for each module / package specified on the
# command line instead of printing them on stdout. Reports (if any) will be
# written in a file name "pylint_global.[txt|html]". This option is deprecated
# and it will be removed in Pylint 2.0.
files-output=no

# Tells whether to display a full report or only the messages
reports=yes

Expand Down Expand Up @@ -199,63 +181,33 @@ property-classes=abc.abstractproperty
# Regular expression matching correct function names
function-rgx=[a-z_][a-z0-9_]{2,30}$

# Naming hint for function names
function-name-hint=[a-z_][a-z0-9_]{2,30}$

# Regular expression matching correct argument names
argument-rgx=[a-z_][a-z0-9_]{2,30}$

# Naming hint for argument names
argument-name-hint=[a-z_][a-z0-9_]{2,30}$

# Regular expression matching correct method names
method-rgx=[a-z_][a-z0-9_]{2,30}$

# Naming hint for method names
method-name-hint=[a-z_][a-z0-9_]{2,30}$

# Regular expression matching correct constant names
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__)|parser(_\w+)?)$

# Naming hint for constant names
const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$

# Regular expression matching correct class names
class-rgx=([A-Z_][a-zA-Z0-9]+|TC_\d{2}_[A-Z][A-Za-z0-9_]+)$

# Naming hint for class names
class-name-hint=[A-Z_][a-zA-Z0-9]+$

# Regular expression matching correct module names
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$

# Naming hint for module names
module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$

# Regular expression matching correct class attribute names
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$

# Naming hint for class attribute names
class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$

# Regular expression matching correct variable names
variable-rgx=[a-z_][a-z0-9_]{2,30}$

# Naming hint for variable names
variable-name-hint=[a-z_][a-z0-9_]{2,30}$

# Regular expression matching correct inline iteration names
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$

# Naming hint for inline iteration names
inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$

# Regular expression matching correct attribute names
attr-rgx=[a-z_][a-z0-9_]{2,30}$

# Naming hint for attribute names
attr-name-hint=[a-z_][a-z0-9_]{2,30}$

# Regular expression which should only match function or class names that do
# not require a docstring.
no-docstring-rgx=^_
Expand Down Expand Up @@ -299,12 +251,6 @@ ignore-long-lines=^\s*(# )?<?https?://\S+>?$
# else.
single-line-if-stmt=no

# List of optional constructs for which whitespace checking is disabled. `dict-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
# `empty-line` allows space-only lines.
no-space-check=trailing-comma,dict-separator

# Maximum number of lines in a module
max-module-lines=1000

Expand Down
4 changes: 2 additions & 2 deletions .qubesbuilder
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
host:
rpm:
build:
- rpm_spec/qubes-u2f-dom0.spec
- rpm_spec/qubes-ctap-dom0.spec
vm:
rpm:
build:
- rpm_spec/qubes-u2f.spec
- rpm_spec/qubes-ctap.spec
deb:
build:
- debian
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = QubesU2Fproxy
SPHINXPROJ = QubesCTAPproxy
SOURCEDIR = .
BUILDDIR = _build

Expand Down
844 changes: 841 additions & 3 deletions Documentation/architecture.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 16 additions & 16 deletions Documentation/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Qubes U2F proxy documentation build configuration file, created by
# Qubes CTAP proxy documentation build configuration file, created by
# sphinx-quickstart on Sat Oct 14 16:25:18 2017.
#
# This file is execfile()d with the current directory set to its
Expand All @@ -21,7 +21,7 @@
import sys
sys.path.insert(0, os.path.abspath('..'))

import qubesu2f
import qubesctap


# -- General configuration ------------------------------------------------
Expand Down Expand Up @@ -53,18 +53,18 @@
master_doc = 'index'

# General information about the project.
project = 'Qubes U2F proxy'
copyright = '2017, Invisible Things Lab'
project = 'Qubes CTAP proxy'
copyright = '2023, Invisible Things Lab'
author = 'Invisible Things Lab'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = qubesu2f.__version__
version = qubesctap.__version__
# The full version, including alpha/beta/rc tags.
release = qubesu2f.__version__
release = qubesctap.__version__

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -107,7 +107,7 @@
# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'qubesu2f'
htmlhelp_basename = 'qubesctap'


# -- Options for LaTeX output ---------------------------------------------
Expand All @@ -134,7 +134,7 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'QubesU2F.tex', 'Qubes U2F proxy Documentation',
(master_doc, 'QubesCTAP.tex', 'Qubes CTAP proxy Documentation',
'Invisible Things Lab', 'manual'),
]

Expand All @@ -144,12 +144,12 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('manpages/qu2f-proxy', 'qu2f-proxy',
'Qubes U2F proxy daemon', [], 8),
('manpages/qu2f-register', 'qu2f-register',
'Qubes U2F_REGISTER qrexec call', [], 1),
('manpages/qu2f-authenticate', 'qu2f-authenticate',
'Qubes U2F_AUTHENTICATE qrexec call', [], 1),
('manpages/qctap-proxy', 'qctap-proxy',
'Qubes CTAP proxy daemon', [], 8),
('manpages/qctap-makecredential', 'qctap-makecredential',
'Qubes CTAP_MAKE_CREDEANTIAL qrexec call', [], 1),
('manpages/qctap-getassertion', 'qctap-getassertion',
'Qubes CTAP_GET_ASSERTION qrexec call', [], 1),
]


Expand All @@ -159,8 +159,8 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'QubesU2Fproxy', 'Qubes U2F proxy Documentation',
author, 'QubesU2Fproxy', 'One line description of project.',
(master_doc, 'QubesCTAPproxy', 'Qubes CTAP proxy Documentation',
author, 'QubesCTAPproxy', 'One line description of project.',
'Miscellaneous'),
]

Expand Down
Loading