Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
Release 2021 3 (#1)
Browse files Browse the repository at this point in the history
* Update ovsa_get_started.md

Initial Changes for 2021.3

* Update ovsa_get_started.md

Fixed Indentation

* Update ovsa_get_started.md

Added changes to command line options

* changed dependent sw versions in the scripts

* changes for 2021.3

* Update ovsa_get_started.md

Fixing Indentation

* Update ovsa_get_started.md

Fixed Indentation

* Add files via upload

HW-SW TPM binding

* Update fingerprint-changes.md

* Update ovsa_get_started.md
  • Loading branch information
ravikumarbhattiprolu authored Mar 24, 2021
1 parent 6eb8595 commit b102952
Show file tree
Hide file tree
Showing 112 changed files with 4,139 additions and 4,627 deletions.
Binary file removed DB/ovsa.db
Binary file not shown.
102 changes: 102 additions & 0 deletions DB/ovsa_create_db.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
#!/usr/bin/env python3
#
# Copyright (c) 2020-2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

import sys, json
import sqlite3
from sqlite3 import Error
import datetime

def create_connection(db_file):

""" create a database connection to the SQLite database
specified by db_file
:param db_file: database file
:return: Connection object or None
"""
conn = None
try:
conn = sqlite3.connect(db_file)
except Error as e:
print(e)

return conn

def main():
# validate command line arguments
if len(sys.argv) != 2:
print('Invalid arguments. ovsa_create_db.py <db file>')
return

database = sys.argv[1]

try:
open(database)
print("DB already exists!")
except IOError as e:
if (e.args[0] == 2): # DB does not exists
print("Creating DB!")
sqlite3.connect(database)
else:
print("Error: " + str(e))
exit()

conn = create_connection(database)

# create table customer_license_info
sql_customer_license = """create table if not exists customer_license_info (
customer_license_id integer primary key autoincrement,
license_guid text,
model_guid text,
isv_certificate text,
customer_certificate text,
license_type integer,
limit_count integer,
usage_count numeric,
time_limit numeric,
created_date numeric,
updated_date numeric) """
print("Creating customer_license_info table...")
conn.execute(sql_customer_license)

# create table tcb_info
sql_tcb_info = """create table if not exists tcb_info (
tcb_info_id integer primary key autoincrement,
tcb_name text,
version text,
mrsigner_id text,
mrenclave_id text,
product_id text,
svn text,
hw_quote text,
sw_quote text,
hw_pubkey text,
sw_pubkey text)"""
print("Creating tcb_info table...")
conn.execute(sql_tcb_info)

#cur = conn.cursor()
#cur.execute("SELECT name FROM sqlite_master WHERE type='table' ORDER BY name; ")
#rows = cur.fetchall()
#for row in rows:
# print(row)

conn.close



if __name__ == "__main__":
main()
2 changes: 1 addition & 1 deletion DB/ovsa_store_customer_lic_cert_db.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
# Copyright (c) 2020 Intel Corporation
# Copyright (c) 2020-2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
40 changes: 25 additions & 15 deletions Dockerfile-build-ovsa
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020 Intel Corporation
# Copyright (c) 2020-2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -24,44 +24,56 @@ ARG build_type=dbg
#TPM Tool Specific installs
RUN yum install -y \
autoconf-archive \
bison \
dbus-devel \
doxygen \
flex \
glib2-devel \
glibc-static \
glibc-static \
json-c-devel \
libiconv \
libstdc++-devel \
libgcrypt-devel \
openssl-devel \
strip \
uriparser-devel && \
yum clean all

SHELL [ "/usr/bin/scl", "enable", "devtoolset-8" ]
ENV CC=/opt/rh/devtoolset-8/root/bin/gcc
ENV CXX=/opt/rh/devtoolset-8/root/bin/g++

#DOXYGEN
WORKDIR /doxygen
RUN git clone https://github.com/doxygen/doxygen.git && \
cd doxygen && \
git checkout Release_1_8_7 && \
./configure && \
make && \
make install

#TPM2 TSS Build
WORKDIR /tpm2-tss-build

RUN wget https://github.com/tpm2-software/tpm2-tss/releases/download/2.4.4/tpm2-tss-2.4.4.tar.gz && \
tar -xzf tpm2-tss-2.4.4.tar.gz && \
cd tpm2-tss-2.4.4 && \
./configure --disable-doxygen-man --prefix=/opt/tpm2-tools && \
RUN wget https://github.com/tpm2-software/tpm2-tss/releases/download/3.0.3/tpm2-tss-3.0.3.tar.gz && \
tar -xvzf tpm2-tss-3.0.3.tar.gz && \
cd tpm2-tss-3.0.3 && \
./configure --with-udevrulesdir=/etc/udev/rules.d/ --prefix=/opt/tpm2-tools && \
make -j8 && \
make install

ENV PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig:/opt/tpm2-tools/lib/pkgconfig
WORKDIR /tpm2-abrmd
RUN wget https://github.com/tpm2-software/tpm2-abrmd/releases/download/2.3.3/tpm2-abrmd-2.3.3.tar.gz && \
tar -xvzf tpm2-abrmd-2.3.3.tar.gz && \
pushd tpm2-abrmd-2.3.3 && \
RUN wget https://github.com/tpm2-software/tpm2-abrmd/releases/download/2.4.0/tpm2-abrmd-2.4.0.tar.gz && \
tar -xvzf tpm2-abrmd-2.4.0.tar.gz && \
pushd tpm2-abrmd-2.4.0 && \
./configure --with-dbuspolicydir=/etc/dbus-1/system.d --prefix=/opt/tpm2-tools && \
make -j8 && \
make install

WORKDIR /tpm2-tools-build
RUN wget https://github.com/tpm2-software/tpm2-tools/releases/download/4.3.0/tpm2-tools-4.3.0.tar.gz && \
tar -xzf tpm2-tools-4.3.0.tar.gz && \
cd tpm2-tools-4.3.0 && \
RUN wget https://github.com/tpm2-software/tpm2-tools/releases/download/5.0/tpm2-tools-5.0.tar.gz && \
tar -xzf tpm2-tools-5.0.tar.gz && \
cd tpm2-tools-5.0 && \
./configure --prefix=/opt/tpm2-tools && \
make -j8 && \
make install
Expand All @@ -85,5 +97,3 @@ RUN cp -rv /opt/tpm2-tools/* /ovsa-runtime/tpm2-tools/

WORKDIR /
RUN tar cvzf ovsa-runtime.tar.gz /ovsa-runtime


2 changes: 1 addition & 1 deletion Dockerfile-pkg-ovsa-nginx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020 Intel Corporation
# Copyright (c) 2020-2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Example/client/client_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020 Intel Corporation
# Copyright (c) 2020-2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Example/runtime/generate_certs.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -x
#
# Copyright (c) 2020 Intel Corporation
# Copyright (c) 2020-2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Example/runtime/openssl_ca.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020 Intel Corporation
# Copyright (c) 2020-2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions Example/runtime/sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"model_config_list":[
{
"config":{
"name":"protected-model",
"name":"controlled-access-model",
"base_path":"/sampleloader/model/fd",
"custom_loader_options": {"loader_name": "ovsa", "keystore": "custkeystore", "protected_file": "face_detection_model"}
"custom_loader_options": {"loader_name": "ovsa", "keystore": "custkeystore", "controlled_access_file": "face_detection_model"}
}
}

Expand Down
2 changes: 1 addition & 1 deletion Example/runtime/start_secure_ovsa_model_server.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -x
#
# Copyright (c) 2020 Intel Corporation
# Copyright (c) 2020-2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
8 changes: 4 additions & 4 deletions License_service/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020 Intel Corporation
# Copyright (c) 2020-2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -60,7 +60,7 @@ openssl_build: openssl/libcrypto.a
openssl/libcrypto.a:
ifeq ($(wildcard $(SRC_BUILD_DIR)/src/lib/openssl),)
cd $(SRC_BUILD_DIR)/src/lib && git clone https://github.com/openssl/openssl.git
cd $(SRC_BUILD_DIR)/src/lib/openssl && git checkout --quiet OpenSSL_1_1_1h
cd $(SRC_BUILD_DIR)/src/lib/openssl && git checkout --quiet OpenSSL_1_1_1j
cd $(SRC_BUILD_DIR)/src/lib/openssl && ./config --prefix=$(shell readlink -f crypto/) shared -fPIC
cd $(SRC_BUILD_DIR)/src/lib/openssl && $(MAKE) && $(MAKE) -j1 install
cd $(SRC_BUILD_DIR)/src/lib/openssl && mv libcrypto.a ../../../lib
Expand Down Expand Up @@ -107,10 +107,10 @@ endif


############################# MBEDTLS DEPENDENCY ##############################
MBEDTLS_VERSION ?= 2.21.0
MBEDTLS_VERSION ?= 2.26.0
MBEDTLS_SRC ?= mbedtls-$(MBEDTLS_VERSION).tar.gz
MBEDTLS_URI ?= https://github.com/ARMmbed/mbedtls/archive/
MBEDTLS_CHECKSUM ?= 320e930b7596ade650ae4fc9ba94b510d05e3a7d63520e121d8fdc7a21602db9
MBEDTLS_CHECKSUM ?= 35d8d87509cd0d002bddbd5508b9d2b931c5e83747d087234cc7ad551d53fe05

# mbedTLS uses a submodule mbedcrypto, need to download it and move under mbedtls/crypto
MBEDCRYPTO_VERSION ?= 3.1.0
Expand Down
2 changes: 1 addition & 1 deletion License_service/download.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Copyright (c) 2020 Intel Corporation
# Copyright (c) 2020-2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit b102952

Please sign in to comment.