Accepting request 890792 from home:aplanas:keylime

Alternative keylime-agent written in Rust. This is a WIP software fetched from git (see _service).

Seems that this will replace the keylime agent written in Python in some future.

If accepted, I would like to be co-maintainer, as this will change for a long time until it reach a stable release.

OBS-URL: https://build.opensuse.org/request/show/890792
OBS-URL: https://build.opensuse.org/package/show/security/rust-keylime?expand=0&rev=1
This commit is contained in:
Marcus Meissner 2021-05-06 15:06:32 +00:00 committed by Git OBS Bridge
commit ca2b84eca8
9 changed files with 134 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

21
_service Normal file
View File

@ -0,0 +1,21 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="versionformat">0.0.1+git.%ct.%h</param>
<param name="revision">master</param>
<param name="url">https://github.com/keylime/rust-keylime.git</param>
<param name="scm">git</param>
<param name="changesgenerate">enable</param>
</service>
<service name="recompress" mode="disabled">
<param name="compression">xz</param>
<param name="file">*.tar</param>
</service>
<!-- <service name="cargo_vendor" mode="disabled"> -->
<!-- <param name="srcdir">rust-keylime</param> -->
<!-- <param name="compression">xz</param> -->
<!-- </service> -->
<!-- <service name="cargo_audit" mode="disabled"> -->
<!-- <param name="srcdir">rust-keylime</param> -->
<!-- </service> -->
<service name="set_version" mode="disabled"/>
</services>

4
_servicedata Normal file
View File

@ -0,0 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/keylime/rust-keylime.git</param>
<param name="changesrevision">f6095257e6f6b306705a0869005b1b6c2e706b9a</param></service></servicedata>

5
cargo_config Normal file
View File

@ -0,0 +1,5 @@
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:65752d5f7d04bf10dfa0a84a931577b51d24d38dc7f458bd5d67eeabf750f6b1
size 30600

15
rust-keylime.changes Normal file
View File

@ -0,0 +1,15 @@
-------------------------------------------------------------------
Tue May 04 12:23:18 UTC 2021 - aplanas@suse.com
- Update to version 0.0.1+git.1618949271.f609525:
* Add more TPM helper functions
* Use PKeys consistently
* Rebase on tss-esapi 5.0
* Pass a PKeyRef to asym_verify
* Use #[[from] from thiserror
* Fix uppercase acronyms
* Add testing feature
* Remove port bindings for agent
* More verbose TPM and revocation error, verbose success
* Fix docker networking

59
rust-keylime.spec Normal file
View File

@ -0,0 +1,59 @@
#
# spec file for package rust-keylime
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global rustflags '-Clink-arg=-Wl,-z,relro,-z,now'
Name: rust-keylime
Version: 0.0.1+git.1618949271.f609525
Release: 0
Summary: Rust implementation of the keylime agent
License: MIT
URL: https://github.com/keylime/rust-keylime
Source: rust-keylime-%{version}.tar.xz
Source1: vendor.tar.xz
Source2: cargo_config
BuildRequires: cargo
BuildRequires: czmq-devel
BuildRequires: rust
BuildRequires: tpm2-0-tss-devel
ExcludeArch: %{ix86} s390x ppc64 ppc64le armhfp armv7hl
%description
Rust implementation of keylime agent. Keylime is system integrity
monitoring system.
%prep
%setup -qa1
mkdir .cargo
cp %{SOURCE2} .cargo/config
%build
RUSTFLAGS=%{rustflags} cargo build --release
%install
RUSTFLAGS=%{rustflags} cargo install --root=%{buildroot}%{_prefix} --path .
install -Dpm 644 keylime.conf %{buildroot}%{_sysconfdir}/keylime.conf
rm %{buildroot}%{_prefix}/.crates.toml
rm %{buildroot}%{_prefix}/.crates2.json
%files
%{_bindir}/keylime_agent
%config(noreplace) %{_sysconfdir}/keylime.conf
%changelog

3
vendor.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bbce59efe0342440068cb9f6450019eb2a0f6bab7c8d89b9a387d119fa77b96e
size 15347840