aaf/sms.git
5 years agoAdd readiness check into the cmd line 26/70026/1 3.0.0
Kiran Kamineni [Mon, 8 Oct 2018 22:32:09 +0000 (15:32 -0700)]
Add readiness check into the cmd line

Preload is not checking if SMS is ready or not
before issuing the upload commands. This patch
fixes that behavior.

Issue-ID: AAF-545
Change-Id: I485aeab4f797cacce1036cd6e24910c65fa4eb69
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoFix bug in directory read with json files 20/70020/2
Kiran Kamineni [Mon, 8 Oct 2018 21:25:37 +0000 (14:25 -0700)]
Fix bug in directory read with json files

The cmdline tool to preload json files is reading from CWD
instead of using the provided commandline dir.

Issue-ID: AAF-544
Change-Id: I8af23f0556ff678c33223e6f6acac402a39dd662
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoAdd preload cmdline tool to docker container 33/69933/1
Kiran Kamineni [Fri, 5 Oct 2018 18:33:50 +0000 (11:33 -0700)]
Add preload cmdline tool to docker container

Add the preload tool developed in patch 69786 to
sms docker container. It will be used from there
in the kubernetes configuration.

Issue-ID: AAF-532
Change-Id: I7ca1d037514da0d56a6c47d6e0c6b845d2fd9a5e
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoAdd preload commandline app to load secrets 86/69786/3
Kiran Kamineni [Thu, 4 Oct 2018 05:11:28 +0000 (22:11 -0700)]
Add preload commandline app to load secrets

Add a preload golang app that reads configuration files
and loads the domains and corresponding secrets to SMS.
The tool can configured via command line options.
P2: Add support for domains as well as domain in JSON
P3: Add sampleformat.json

Issue-ID: AAF-532
Change-Id: If3f880b8ce61a282dc015cac7df723453b91f114
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoUpdate coverage report for SMS 19/68219/1
Kiran Kamineni [Thu, 20 Sep 2018 17:43:28 +0000 (10:43 -0700)]
Update coverage report for SMS

Update the coverage.html for SMS.
The onap wiki already has the updated coverage numbers

Issue-ID: AAF-512
Change-Id: Ibdd28553a59781fcc91ef3d7176b23fc5c71de98
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoUpdate client to reflect server changes 97/67097/2
Kiran Kamineni [Mon, 17 Sep 2018 19:52:01 +0000 (12:52 -0700)]
Update client to reflect server changes

Update client to reflect name based URL changes in server

Issue-ID: AAF-494
Change-Id: I320e8f539b50a0666e12588bf1c1cbc9e54deb52
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoRevert change to UUID and go back to domain names 95/67095/1
Kiran Kamineni [Mon, 17 Sep 2018 19:44:40 +0000 (12:44 -0700)]
Revert change to UUID and go back to domain names

UUID based urls are pain points for clients as per feedback
Reverting to using known domain names

Issue-ID: AAF-502
Change-Id: If3d5861ad8cc40adf84d41cd90c90fcde60446ab
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoBumped the version of onapsmsclient 35/66735/1
Dileep Ranganathan [Fri, 14 Sep 2018 11:43:40 +0000 (04:43 -0700)]
Bumped the version of onapsmsclient

Bumped the version of onapsmsclient to 0.0.3

Change-Id: I18ac598b1ea48ad5159ebe678bd6532778afe9d5
Issue-ID: AAF-438
Signed-off-by: Dileep Ranganathan <dileep.ranganathan@intel.com>
5 years agoFix python client to handle UUID 45/66445/2
Kiran Kamineni [Thu, 13 Sep 2018 19:32:54 +0000 (12:32 -0700)]
Fix python client to handle UUID

Python client does not support UUID based query right now.
This patch addresses that issue

Issue-ID: AAF-494
Change-Id: Ied45ba6b593a68b7570f76fb9fdbb9173a005b72
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoFix service name in start script 43/66243/2
Kiran Kamineni [Wed, 12 Sep 2018 22:37:44 +0000 (15:37 -0700)]
Fix service name in start script

The sms.sh startup script for VMs uses a different name
vs the real service name to connect to the host bridge.

Issue-ID: AAF-489
Change-Id: I76a3d0bd249ca6044481f2e6f0375ec83e3b02d5
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoAdd UUID for operations instead of domainName 77/66277/1
Kiran Kamineni [Thu, 13 Sep 2018 04:40:50 +0000 (21:40 -0700)]
Add UUID for operations instead of domainName

UUID will be used by other micro service to operate
on their respective domains.

Issue-ID: AAF-439
Change-Id: Icc32fa48da7be4b79e570f2b7da5453287013bcc
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoAdded python3 support for sms client 13/66213/1
Dileep Ranganathan [Wed, 12 Sep 2018 12:40:34 +0000 (05:40 -0700)]
Added python3 support for sms client

Added python3 support for sms client

Change-Id: I49dfa4de5b1c4aed07dd0ef8e85fcf1d448bfc92
Issue-ID: AAF-438
Signed-off-by: Dileep Ranganathan <dileep.ranganathan@intel.com>
5 years agoRenamed package name to onapsmsclient 19/65619/2
Dileep Ranganathan [Mon, 10 Sep 2018 15:16:59 +0000 (08:16 -0700)]
Renamed package name to onapsmsclient

Renamed onap-sms-client to onapsmsclient

Change-Id: Ia3fad5d4558b51cf848e28b267fbae537320d183
Issue-ID: AAF-438
Signed-off-by: Dileep Ranganathan <dileep.ranganathan@intel.com>
5 years agoCreate python distribution for onap-sms-client 91/64891/4
Dileep Ranganathan [Wed, 5 Sep 2018 13:43:30 +0000 (06:43 -0700)]
Create python distribution for onap-sms-client

Renamed to onap-sms-client to conform to standard packaging
Created and uploaded onap-sms-client python distribution to PyPI
This will allow onapsmsclient to be installed using pip.

Change-Id: I8ab1137fce5dbb022d54a2c96bc3acdc97d7e63d
Issue-ID: AAF-438
Signed-off-by: Dileep Ranganathan <dileep.ranganathan@intel.com>
5 years agoAdd python client for SMS service 53/61153/3
Kiran Kamineni [Fri, 17 Aug 2018 22:54:05 +0000 (15:54 -0700)]
Add python client for SMS service

Add python client for SMS service.
Other ONAP microservices can use this
client to connect to SMS to store and get
secrets.

Issue-ID: AAF-438
Change-Id: I5bb39001e8482b9191512b1422ed7edadbd2ec67
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoChanging version to casablanca 35/56135/1
Kiran Kamineni [Tue, 10 Jul 2018 18:20:31 +0000 (11:20 -0700)]
Changing version to casablanca

Update version from 2.0.0 to 3.0.0
for casablanca

Issue-ID: AAF-390
Change-Id: Ibcf0eb59addc2e287db25021293b155113b1ae58
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoMove version.properties as its not configurable 39/50839/1 2.0.0-ONAP beijing 2.0.0-ONAP v2.0.0
Kiran Kamineni [Wed, 6 Jun 2018 22:02:11 +0000 (15:02 -0700)]
Move version.properties as its not configurable

Version.properties path is not configurable in jenkins
global templates. Therefore moving it to root of repo.

Issue-ID: AAF-330
Change-Id: If0106b59e04b01d0d571878b74399c242041ff91
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoAdd version.properties for beijing release 53/50753/2
Kiran Kamineni [Wed, 6 Jun 2018 18:01:59 +0000 (11:01 -0700)]
Add version.properties for beijing release

Add version.properties file for beijing release

Issue-ID: AAF-330
Change-Id: Idddddfb2cb38975874698e1604c64f3a34307975
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoPropagate error upward 23/50523/1
Kiran Kamineni [Wed, 6 Jun 2018 00:19:12 +0000 (17:19 -0700)]
Propagate error upward

Build was not catching error
Now throwing the error up the chain

Issue-ID: AAF-346
Change-Id: I5a1729097f573d0169c4485075183d40c8d31db2
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoUpdate certificates with latest intermediate CA 01/50501/2
Kiran Kamineni [Tue, 5 Jun 2018 22:34:06 +0000 (15:34 -0700)]
Update certificates with latest intermediate CA

Intermediate CA had expired. Using the updated
certificate with the new intermediate CA. Updating
lock file to handle go package dependency

Issue-ID: AAF-346
Change-Id: I0751011e3e96be326436c0d9799f08d5b55eaa76
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoAdd INFO.yaml file 39/49039/2
Jessica Wagantall [Thu, 24 May 2018 22:12:25 +0000 (15:12 -0700)]
Add INFO.yaml file

Add INFO.yaml to list:
- Project description
- Properties
- PTL information
- Meeting information
- Committer information

Change-Id: Ia743a9bb2443530ce67e2bbf9a00771e8c30fcf0
Issue-ID: CIMAN-134
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
5 years agoAdd ONAP truststore and comment example client 55/49055/1
Kiran Kamineni [Thu, 24 May 2018 22:50:33 +0000 (15:50 -0700)]
Add ONAP truststore and comment example client

Add ONAP truststore with certificate only in jks format
Add comments to the client example illustrating various
use cases
Support error message read from returned error body

Issue-ID: AAF-92
Change-Id: I9709005c13d739883621eed09ce34fcb4715f1fd
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoFix titles in docs 67/48767/1
Kiran Kamineni [Wed, 23 May 2018 18:05:08 +0000 (11:05 -0700)]
Fix titles in docs

Fix titles in docs so that they are sub
titles under the main Secret Management Service
title.

Issue-ID: AAF-185
Change-Id: Ia58b0666726c0b8427d053c0303566712af47401
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoAdd release notes and fix docs 01/48601/2
Kiran Kamineni [Wed, 23 May 2018 00:38:16 +0000 (17:38 -0700)]
Add release notes and fix docs

Add release notes for SMS
Fix other docs issues in SMS

Issue-ID: AAF-185
Change-Id: Ib3860018229b61942ab8a48cfdafe0b3f21ceed1
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoUpdate pom.xml to support daily release target 89/48589/1
Kiran Kamineni [Tue, 22 May 2018 21:54:25 +0000 (14:54 -0700)]
Update pom.xml to support daily release target

Update pom.xml to support daily sms-client release
to nexus repo

Issue-ID: AAF-92
Change-Id: I86c94bf3cd1a74ab910d7fa3336d25aac33b618f
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoAdding some comments and small refactoring 31/48131/2
Kiran Kamineni [Thu, 17 May 2018 23:09:12 +0000 (16:09 -0700)]
Adding some comments and small refactoring

Added some comments to code
Also, refactored some things in the client

Issue-ID: AAF-92
Change-Id: I7166f8e47c31725b443662ad28e040d7ff26738d
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoMoving java code to java folder 87/47887/1
Kiran Kamineni [Wed, 16 May 2018 19:26:30 +0000 (12:26 -0700)]
Moving java code to java folder

This is to setup the area for clients in
other languages used in ONAP. Eg: python

Issue-ID: AAF-289
Change-Id: I597492c6ba2be3291d383b98c205cb7725b1a3ac
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoUpdating certificates to fix healthcheck 69/47669/2
Kiran Kamineni [Tue, 15 May 2018 16:53:23 +0000 (09:53 -0700)]
Updating certificates to fix healthcheck

Updating certificates to latest with the
fixed FQDN name in cert. Previous one had
api missing in there.

Issue-ID: AAF-288
Change-Id: Ib594acd3ed1a77ddd441a670e7df0cdd05523a2a
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoAdding a docs folder under sms repo 15/46315/3
Kiran Kamineni [Fri, 4 May 2018 23:50:39 +0000 (16:50 -0700)]
Adding a docs folder under sms repo

WORK IN PROGRESS
Adding a docs folder under sms

Issue-ID: AAF-185
Change-Id: I5ee3560cfda2100ad5207bb7e98d5cb9472e1325
Signed-off-by: Girish Havaldar <hg0071052@techmahindra.com>
5 years agofix for broken unit tests 43/47643/1
Kiran Kamineni [Tue, 15 May 2018 15:52:23 +0000 (08:52 -0700)]
fix for broken unit tests

Previous patch did not fix the tests
Updating.

Issue-ID: AAF-285
Change-Id: Ie0972651e6bdee77cb6563b2c8d9693a6db876d8
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agofixing auth test 23/47523/1
Kiran Kamineni [Tue, 15 May 2018 04:59:23 +0000 (21:59 -0700)]
fixing auth test

fixing auth test for auth.go
auth is failing unit tests because of updated
use of gettlsconfig

Issue-ID: AAF-285
Change-Id: I96ec74adcce042aa411d834811881755f00b7ac7
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoAdding updated certs and encryption 87/47487/3
Kiran Kamineni [Mon, 14 May 2018 21:40:03 +0000 (14:40 -0700)]
Adding updated certs and encryption

Adding new SAN certificates from AAF
Adding encrypted storage for certificates
Moving certificates to different folder during
deployment. certs vs auth

Issue-ID: AAF-284
Change-Id: Ic0c3972556b36f773c7a653059eccd077624e4b6
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoMake sure bash is used to execute script 27/46927/1
Kiran Kamineni [Wed, 9 May 2018 22:14:57 +0000 (15:14 -0700)]
Make sure bash is used to execute script

If the bash header is not used, the script
fails to resolve the names for the quorum clients
in the for loop.

Issue-ID: AAF-280
Change-Id: Ia08d8522b5a5764024a0ed8da32f26e1a7d432af
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoAdding healthcheck endpoint for sms 49/45949/1
Kiran Kamineni [Thu, 3 May 2018 18:27:59 +0000 (11:27 -0700)]
Adding healthcheck endpoint for sms

Added a new url endpoint for healthcheck
/v1/sms/healthcheck which will run a simple
operation on the backend and return OK or error

Issue-ID: AAF-263
Change-Id: Idbfaeff50e6a8c36fa25c081a3b1c6169535ea36
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoadding a bash script to launch sms in a vm 39/45339/3
Kiran Kamineni [Tue, 1 May 2018 04:03:45 +0000 (21:03 -0700)]
adding a bash script to launch sms in a vm

This is to support vm/baremetal based deployments

Issue-ID: AAF-262
Change-Id: Iff3bca737187de5ca49d9ec6b93082344e007d9e
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
5 years agoUsing SNI for service names to support k8s 05/45305/2
Kiran Kamineni [Mon, 30 Apr 2018 18:14:19 +0000 (11:14 -0700)]
Using SNI for service names to support k8s

Using SNI in quorum client connection to
connect to SMS service via https

Issue-ID: AAF-265
Change-Id: I5108e9d734f11a4f74c41a41a2d8cd2f72c62b36
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoUpdating files with root ca certificate 27/45027/1
Kiran Kamineni [Fri, 27 Apr 2018 04:57:47 +0000 (21:57 -0700)]
Updating files with root ca certificate

Previous patch was missing the root ca file.
Needed in case clients provide their own cert

Issue-ID: AAF-265
Change-Id: I4dcdf6d424e4837aadfc01fc7caba8df93623658
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoAdding cert files to support https 99/44999/1
Kiran Kamineni [Fri, 27 Apr 2018 00:31:07 +0000 (17:31 -0700)]
Adding cert files to support https

Adding cert files generated by AAF CA
Incorporating them into the docker build as well

Issue-ID: AAF-265
Change-Id: I1ee1e031bf058a0325fe2c6fe8eed5e3948d70e7
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoQuorum client creates its data folder before write 45/44745/2
Kiran Kamineni [Wed, 25 Apr 2018 19:16:15 +0000 (12:16 -0700)]
Quorum client creates its data folder before write

Data folder is not guaranteed to exist and therefore
needs to be created before writes can be done on it.

Issue-ID: AAF-261
Change-Id: I4671f0dac34a04c80639386719639b8c9472a9d3
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoUpdating version for docker images to 2.0.0 39/44539/3
Kiran Kamineni [Tue, 24 Apr 2018 23:28:44 +0000 (16:28 -0700)]
Updating version for docker images to 2.0.0

Docker images are getting loaded with version 1.1.0
They need to be 2.0.0

Issue-ID: AAF-258
Change-Id: I5643ccdaf5eae1e7101e37dbbe858ae346ff0e30
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoAdd more test cases for sms-client 63/44263/3
Manjunath Ranganathaiah [Mon, 23 Apr 2018 22:24:03 +0000 (15:24 -0700)]
Add more test cases for sms-client

This patch adds unit test cases for:
 Storing and deleting secrets.
 Listing the secret names.
 Getting the secret details.

Change-Id: Ida8d08202305be818926993d676c778605e130f3
Issue-ID: AAF-183
Signed-off-by: Manjunath Ranganathaiah <manjunath.ranganathaiah@intel.com>
6 years agoRefactor logger and use it everywhere 15/44015/3
Kiran Kamineni [Fri, 20 Apr 2018 04:27:01 +0000 (21:27 -0700)]
Refactor logger and use it everywhere

Refactored the logger to print the right line
number. This is done by using the runtime.caller
function within the logger.output function

Issue-ID: AAF-257
Change-Id: Ie26de43ca74c71f382d3b5f93ebd4eaf6d51e2b4
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoAdding unit tests for Vault backend 03/43803/1
Kiran Kamineni [Wed, 18 Apr 2018 21:14:31 +0000 (14:14 -0700)]
Adding unit tests for Vault backend

These unit tests create a mock vault server
and run the commands through it to test the core
functionality.

Issue-ID: AAF-118
Change-Id: Iab658cc60590b98c1524ccd5d57986e1fe2594c9
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoAdded lock for quorum registration 17/43417/3
Kiran Kamineni [Tue, 17 Apr 2018 18:49:21 +0000 (11:49 -0700)]
Added lock for quorum registration

Added lock for quorum registration
Removed debug statement

Issue-ID: AAF-92
Change-Id: Ib2de5ae7ed31b93b6853c78a70305a401ba3c014
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoFixing CSIT test 11/43411/2
Kiran Kamineni [Tue, 17 Apr 2018 18:06:53 +0000 (11:06 -0700)]
Fixing CSIT test

CSIT test for sms broke because of quorum client
code changes

Issue-ID: AAF-251
Change-Id: I99d3d5fdcd800fbf1d4557488d03a65a0e891dfa
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoEnabling container build for quorum client 09/43409/1
Kiran Kamineni [Tue, 17 Apr 2018 17:39:11 +0000 (10:39 -0700)]
Enabling container build for quorum client

Enabling the building of docker images for the
quorum client

Issue-ID: AAF-95
Change-Id: I5800e0972cbebf38d560d975e4bcb0e7939deeeb
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoAdding secure init code for backend 27/42627/5
Kiran Kamineni [Wed, 21 Mar 2018 16:13:26 +0000 (09:13 -0700)]
Adding secure init code for backend

Changes to allow quorum client to SMS communication
Introducing a registration api for quorum clients to get
their shard piece in PGP encrypted form from SMS
Tested with 3 quorum clients. This is now ready for review.

Issue-ID: AAF-168
Change-Id: I7a6ade792c1e5ebcf00cbc8c4a1f1942c006e7c7
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoChanging client auth method to verify if given 65/42165/2
Kiran Kamineni [Wed, 11 Apr 2018 05:07:18 +0000 (22:07 -0700)]
Changing client auth method to verify if given

Changing client auth to verify if given to allow client
connections where client does not have a certificate

Issue-ID: AAF-93
Change-Id: Ifd8f59108536889bacb0fe1477dc1e1c8a0ff4dc
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoAdd maven build structure 89/42089/4
Manjunath Ranganathaiah [Tue, 10 Apr 2018 20:22:00 +0000 (13:22 -0700)]
Add maven build structure

Restructure the directories and files
to accommodate maven build. This will build,
test and generate jar file for clients to use.
Adds a target in the top level makefile.

Issue-ID: AAF-183
Change-Id: I8c27396248d83070befe51f2c6e01aed7dea9202
Signed-off-by: Manjunath Ranganathaiah <manjunath.ranganathaiah@intel.com>
6 years agoRefactoring some code and adding disable_tls flag 93/42093/3
Kiran Kamineni [Fri, 6 Apr 2018 23:45:23 +0000 (16:45 -0700)]
Refactoring some code and adding disable_tls flag

Refactored some code and adding disable_tls flag
This is needed for now to enable some end to end
testing of quorum abilities and will be enabled
once certificate support is added to ONAP
Also updated test script to take port as argument

Issue-ID: AAF-95
Change-Id: I4124bbfd22185a83b3c671b8a0499bfb3bde865d
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoStoring UUID that is created for secret domain 83/42083/1
Kiran Kamineni [Tue, 10 Apr 2018 22:13:03 +0000 (15:13 -0700)]
Storing UUID that is created for secret domain

The UUID that is generated for secret domains
should be stored securely in Vault. These can
be used for future authorized access enforcement.

Issue-ID: AAF-222
Change-Id: I141ceb16b3c4a258cc5f6088585a9944093277af
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agorenaming folder to match go executable 55/41255/2
Kiran Kamineni [Thu, 5 Apr 2018 18:54:20 +0000 (11:54 -0700)]
renaming folder to match go executable

Renaming folder from smsquorum to quorumclient
Added quorumclient build as part of the makefile
Will upload another patch in ci-management that
will call the new parent makefile

Issue-ID: AAF-213
Change-Id: Ib85ac6b9dc454fc1447cf2221a555d7a7552efa5
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agomoving the docker build portion 67/41167/1
Kiran Kamineni [Thu, 5 Apr 2018 04:31:16 +0000 (21:31 -0700)]
moving the docker build portion

Moving the docker build scripts too

Issue-ID: AAF-213
Change-Id: I97c1de10d198c6afc97c763c54d862a10b5b7f92
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoMoving quorum and sms into common GOPATH 21/41021/3
Kiran Kamineni [Wed, 4 Apr 2018 18:54:23 +0000 (11:54 -0700)]
Moving quorum and sms into common GOPATH

Moving quorum code and sms service code into
common GOPATH for easier building and sharing
of common modules between them.

Issue-ID: AAF-213
Change-Id: I88a8bcc0a94960163766718a2eef6bf34fd2c1e3
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoAdding a new parent Makefile 17/41017/2
Kiran Kamineni [Wed, 4 Apr 2018 18:41:40 +0000 (11:41 -0700)]
Adding a new parent Makefile

This patch adds a new parent Makefile that will be called
by the jenkins job once the smsquorum code also comes under
this GOPATH

Issue-ID: AAF-213
Change-Id: I50d5f72b91455c501505130fbbf41ba245f1800a
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoChanging docker image build to use filename 79/41079/2
Kiran Kamineni [Wed, 4 Apr 2018 21:03:56 +0000 (14:03 -0700)]
Changing docker image build to use filename

Changing the docker image build process to use
a specified file instead of default Dockerfile
Also, fixing the line endings in .sh file to use
Unix line endings.

Issue-ID: AAF-213
Change-Id: I715a8d86a3bd2433f92d42e216a1f52f56cebf9b
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoAdded Makefile for quorumclient 35/40335/4
giri [Thu, 29 Mar 2018 04:58:14 +0000 (04:58 +0000)]
Added Makefile for quorumclient

Added Makefile for quorumclient

Change-Id: Iee3912a8a675c7eab2514fc9257ae97dfc8b7157
Issue-ID: AAF-205
Signed-off-by: giri <hg0071052@techmahindra.com>
6 years agoAdd test case for delete domain 79/40579/2
Manjunath Ranganathaiah [Mon, 2 Apr 2018 22:47:36 +0000 (15:47 -0700)]
Add test case for delete domain

Change-Id: I1ae8372d024ad5b718d369ccf9c82e3ae7d0bdd5
Issue-ID: AAF-183
Signed-off-by: Manjunath Ranganathaiah <manjunath.ranganathaiah@intel.com>
6 years agoAdding Docker Support for Quorum client 95/39995/4
giri [Thu, 29 Mar 2018 04:58:14 +0000 (04:58 +0000)]
Adding Docker Support for Quorum client

Adding Docker support for the, this is still
work in progress

Change-Id: Iecbdbe13ccfa79c542f8af619e882d87033512fd
Issue-ID: AAF-201
Signed-off-by: giri <hg0071052@techmahindra.com>
6 years agoAdding alternative method to set backend URL 73/40573/1
Kiran Kamineni [Mon, 2 Apr 2018 21:32:45 +0000 (14:32 -0700)]
Adding alternative method to set backend URL

SMS gets the backend address from ENV variable
if nothing is provided in the config.json file

Issue-ID: AAF-209
Change-Id: I7791ec6db3627092f9161088ed6242ed71368293
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoFix build failure for patch 39785 83/39983/1
Kiran Kamineni [Thu, 29 Mar 2018 04:26:56 +0000 (21:26 -0700)]
Fix build failure for patch 39785

Patch 39785 caused a unit test failure
Fixing that here

Issue-ID: AAF-202
Change-Id: I41dd2883f353e266a48033584c7b83a3670fcc62
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoDelete secret returns with 204 85/39785/2
Kiran Kamineni [Wed, 28 Mar 2018 18:34:20 +0000 (11:34 -0700)]
Delete secret returns with 204

Delete secret should return 204 similar
to Delete Domain

Issue-ID: AAF-202
Change-Id: I63789f651c03aa19179c6ba8f271668d914181fd
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoMinor changes to files 53/39753/1
Kiran Kamineni [Tue, 27 Mar 2018 23:30:46 +0000 (16:30 -0700)]
Minor changes to files

Minor changes to the repo
Updating the .gitignore file

Issue-ID: AAF-92
Change-Id: I43b054709d0067f4d719c9176a1fdd50d1621a48
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoAdding a disable tls flag to sms 29/39429/1
Kiran Kamineni [Wed, 28 Mar 2018 05:42:51 +0000 (22:42 -0700)]
Adding a disable tls flag to sms

Adding a disable_tls flag to allow
running the service in tests and other
non production environments. Also,
CSIT tests may not support TLS tests

Issue-ID: AAF-189
Change-Id: I936b3b887104f2b041a8c73909951a25494eebeb
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoTest framework for sms client code. 15/37515/5
Manjunath Ranganathaiah [Wed, 21 Mar 2018 16:12:04 +0000 (09:12 -0700)]
Test framework for sms client code.

Adds a test case for create domain interface

Change-Id: I198d4e91845753ca359330c367180bd3a3732f30
Issue-ID: AAF-183
Signed-off-by: Manjunath Ranganathaiah <manjunath.ranganathaiah@intel.com>
6 years agoAdding system test coverage support 03/38203/1
Kiran Kamineni [Fri, 23 Mar 2018 21:14:10 +0000 (14:14 -0700)]
Adding system test coverage support

Added support for running system level code coverage tasks
Updated sms.go to allow graceful shutdown when it
gets a SIGINT. Useful for gather coverage information.

Issue-ID: AAF-192
Change-Id: Ife4a485e7926fd59948bf90fac4b2d4ea9de0332
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoUpdating with binary compile in the bash script 87/37887/3
Kiran Kamineni [Thu, 22 Mar 2018 21:16:40 +0000 (14:16 -0700)]
Updating with binary compile in the bash script

Adding build commands within the bash script
This will then be called in the nightly docker
push

Issue-ID: AAF-100
Change-Id: Iab29de26c7f9feac1b3f76666f1674ad7a267da8
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoAdding PGP decrypt to auth package 23/37623/1
Kiran Kamineni [Thu, 22 Mar 2018 00:16:13 +0000 (17:16 -0700)]
Adding PGP decrypt to auth package

Adding PGP decrypt function to auth.
This can be used by quorum client in its code for decryption

Issue-ID: AAF-165
Change-Id: I6d236c3164ccb93c11527ac8c2e725987236f9f0
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoAdding bash script to call docker build 69/37269/2
Kiran Kamineni [Tue, 20 Mar 2018 22:12:13 +0000 (15:12 -0700)]
Adding bash script to call docker build

Adding the necessary bash scripts to be called for docker build
These will be called by the jenkins job for the nightly docker build

Issue-ID: AAF-100
Change-Id: Iae0c095d44849ae65583247fc7026f313d1ee0b7
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoMaking the build completely static for docker 71/37271/1
Kiran Kamineni [Fri, 9 Mar 2018 19:49:24 +0000 (11:49 -0800)]
Making the build completely static for docker

Making the build static is good for deployment on a container.
There is no need to worry about installing dependencies and so on.

Issue-ID: AAF-182
Change-Id: I6bb34ccae423886d9154b2a713b81911f739e9ff
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoReturn only values to the caller of getSecret 69/36069/4
Manjunath Ranganathaiah [Thu, 15 Mar 2018 21:41:12 +0000 (14:41 -0700)]
Return only values to the caller of getSecret

Use returned values of map for datatype variables.

Change-Id: I3829eab81e5e573505efff68970bd3495b7a92f0
Issue-ID: AAF-98
Signed-off-by: Manjunath Ranganathaiah <manjunath.ranganathaiah@intel.com>
6 years agoUpdate listsecret return to send a JSON object 75/35575/4
Kiran Kamineni [Tue, 13 Mar 2018 19:59:37 +0000 (12:59 -0700)]
Update listsecret return to send a JSON object

Instead of sending JSONArray, retrun JSON object
for consistency and client processing

Issue-ID: AAF-172
Change-Id: I17d2e2c2865a817c8016987f998c87259413f306
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoUpdated with variety of values in client example 95/35795/2
Kiran Kamineni [Wed, 14 Mar 2018 16:35:32 +0000 (09:35 -0700)]
Updated with variety of values in client example

Added a few different values in map that are of different
datatypes
Sorted the import statements and grouped by function

Issue-ID: AAF-98
Change-Id: Ibe9f3188b1373c10275ea4aa4817eca789680b91
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoUsing embedded lock for vault struct 79/35579/2
Kiran Kamineni [Tue, 13 Mar 2018 20:50:17 +0000 (13:50 -0700)]
Using embedded lock for vault struct

Using an embedded lock instead of an explicit variable

Issue-ID: AAF-92
Change-Id: Ia7bd43a40ec50664b042afa9e46091f14122ba5c
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoInitial structure and java code for sms client. 57/34857/9
Manjunath Ranganathaiah [Thu, 8 Mar 2018 22:43:37 +0000 (14:43 -0800)]
Initial structure and java code for sms client.

Change-Id: I245302bc125515269be948bb8b6874a7d3cb5367
Issue-ID: AAF-98
Signed-off-by: Manjunath Ranganathaiah <manjunath.ranganathaiah@intel.com>
6 years agoFixing the logger initialization to sms.go 01/35001/2
Kiran Kamineni [Fri, 9 Mar 2018 22:23:09 +0000 (14:23 -0800)]
Fixing the logger initialization to sms.go

Using golang init is creating log files in various folders
when tests are run.
Moved to Init which is called my server initialization.

Issue-ID: AAF-148
Change-Id: Ia05fa1ed1841fd6a98852329ab031372f6489ad6
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoAdding PGP key creation capability for vault init 79/34979/1
Kiran Kamineni [Fri, 9 Mar 2018 19:03:36 +0000 (11:03 -0800)]
Adding PGP key creation capability for vault init

Adding a couple of functions to support PGP key generation
and using said keys to initialise vault.

Issue-ID: AAF-165
Change-Id: Ic65f8157f125005d544bbf8dede184bd282a5357
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoAdding handler unit tests 97/34897/1
Kiran Kamineni [Fri, 9 Mar 2018 04:58:29 +0000 (20:58 -0800)]
Adding handler unit tests

Adding updated unit tests for handler.go
They needed to be fleshed out based on the handler implementation

Issue-ID: AAF-131
Change-Id: Id161faef7500947d858e99b9648f951bc1e54e09
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoAdding url configuration for endpoint tests 55/34855/1
Kiran Kamineni [Thu, 8 Mar 2018 22:11:15 +0000 (14:11 -0800)]
Adding url configuration for endpoint tests

URL is now a command line parameter for endpoint tests

Issue-ID: AAF-161
Change-Id: I6f740ad5cbbd3c73ee7e9a4556acef360a1aefa5
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoDockerfile for SMS containerization 73/33173/3
vamshi.nemalikonda [Thu, 8 Mar 2018 08:06:20 +0000 (08:06 +0000)]
Dockerfile for SMS containerization

Building Dockerfile for SMS containerization - implemented review comments Issue-ID: AAF-147

Change-Id: I85030f461d6242d0bd4358dce7ac3b6d86edfd22
Signed-off-by: vamshi.nemalikonda <vn00480215@techmahindra.com>
6 years agoUpdated the URL with sms service url 23/34523/3
giri [Wed, 7 Mar 2018 13:57:28 +0000 (19:27 +0530)]
Updated the URL with sms service url

Updated Quorum client with correct url
of sms service and tls configuration,urls with https

Change-Id: Ifb957497426b5a1fa085bcc7f300e09de34dade4
Issue-ID: AAF-130
Signed-off-by: giri <hg0071052@techmahindra.com>
6 years agoAdding endpoint test scripts 75/34375/2
Kiran Kamineni [Wed, 7 Mar 2018 00:26:11 +0000 (16:26 -0800)]
Adding endpoint test scripts

Adding endpoint tests that use curl and some dummy data
to exercise the various endpoints that are deployed

Issue-ID: AAF-161
Change-Id: I522216ac790db10a68f4d2af8e845d7526b9fa48
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoChanging json encoding of response 73/34373/2
Kiran Kamineni [Wed, 7 Mar 2018 00:18:49 +0000 (16:18 -0800)]
Changing json encoding of response

Updating the json encoding to use Marshal
This is to allow us to set the right return Header type
and also return the right status codes

Issue-ID: AAF-160
Change-Id: Ib260e5b8306b16069c57f6b83efcf401747ff2b6
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoLog errors to log file 41/34341/2
Kiran Kamineni [Tue, 6 Mar 2018 19:36:40 +0000 (11:36 -0800)]
Log errors to log file

Currently errors are being written out to the screen
Log them to a log file with the appropriate prefix instead
This uses the sms/log framework for logging

Issue-ID: AAF-159
Change-Id: Ib4f4dbc87fa4b1ee92ed1055de94f8324bd1a192
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoRenamed config file to template file 17/34217/1
Kiran Kamineni [Tue, 6 Mar 2018 05:57:01 +0000 (21:57 -0800)]
Renamed config file to template file

Renamed config file to template file
Template file needs to be renamed on server side with
local customizations before server start

Issue-ID: AAF-157
Change-Id: I8a6004774fc8fabaa96d130f3d17c38f74453b11
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoAdding unseal backend support 61/34161/2
Kiran Kamineni [Tue, 6 Mar 2018 00:50:16 +0000 (16:50 -0800)]
Adding unseal backend support

Unseal backend support is now added.
The quorum client will use this api to unseal/initialize the backend
storage service

Issue-ID: AAF-156
Change-Id: Ic2726e9a5ca351912a16c3ec911d03e400233277
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoInit role does not depend on vault state 53/33853/4
Kiran Kamineni [Fri, 2 Mar 2018 20:49:06 +0000 (12:49 -0800)]
Init role does not depend on vault state

Role initialization should not depend on vault state
SMS start is independent of vault state
Any calls to SMS will fail since backend is not active yet

Issue-ID: AAF-155
Change-Id: I810eb145b4eab4717dede12e79880aced08caaa2
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoUpdating api documentation 29/34129/1
Kiran Kamineni [Mon, 5 Mar 2018 20:57:22 +0000 (12:57 -0800)]
Updating api documentation

Updating API documentation to add login, status and unseal end points

Issue-ID: AAF-121
Change-Id: I073d970aa779353a34236e61692ca67f380084b6
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoAdding logging framework 93/33493/2
Kiran Kamineni [Thu, 1 Mar 2018 01:06:29 +0000 (17:06 -0800)]
Adding logging framework

Adding a framework for logging
We will add other logging integrations into this framework

Issue-ID: AAF-148
Change-Id: Ia16d1ddf4c24a5e2f957c429aff23970d081ccc4
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoMinor code cleanup 71/33471/1
Kiran Kamineni [Wed, 28 Feb 2018 21:15:29 +0000 (13:15 -0800)]
Minor code cleanup

Using constant names instead of numbers
Removed an unused handler

Issue-ID: AAF-99
Change-Id: I16101576daee140acd40c3db906dd22289d71188
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoAdded Quorum client with vault config file 59/32559/3
giri [Thu, 22 Feb 2018 14:37:05 +0000 (20:07 +0530)]
Added Quorum client with vault config file

Quorum client is used to check the
status of the vault and unseal if found sealed

Change-Id: I113fd64ee8a3ed97b2c445f9a27d7352dc86aaaf
Issue-ID: AAF-130
Signed-off-by: giri <hg0071052@techmahindra.com>
6 years agoAdding deletedomain implementation 43/32943/2
Kiran Kamineni [Mon, 26 Feb 2018 20:37:19 +0000 (12:37 -0800)]
Adding deletedomain implementation

Adding deletedomain implementation in vault.go
This is a silent command and will not return any error
if the domain to be deleted does not exist

Issue-ID: AAF-144
Change-Id: Iff97a1a5be7415cd0c7ebb2894f16348718e2839
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoFixing the usage of pointer in config 67/32967/2
Kiran Kamineni [Mon, 26 Feb 2018 23:48:11 +0000 (15:48 -0800)]
Fixing the usage of pointer in config

Initializing the pointer before using it in JSON
decode. This was not erroring out before, but this
is the right usage.

Issue-ID: AAF-145
Change-Id: I9a4f8adbe946e896112a8fbef2a84b790578f780
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoImproved error handling during startup 69/32969/1
Kiran Kamineni [Tue, 27 Feb 2018 00:16:41 +0000 (16:16 -0800)]
Improved error handling during startup

Server startup is silent when there are errors
Making server startup more informative in cases
where errors are encountered.

Issue-ID: AAF-146
Change-Id: Iec9a44d0d10813cf77aef69dbfd5fd50eea10dbc
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
6 years agoMerge "Adding Listsecret capability"
Girish Havaldar [Sat, 24 Feb 2018 04:51:14 +0000 (04:51 +0000)]
Merge "Adding Listsecret capability"

6 years agoAdding Listsecret capability 13/32713/2
Kiran [Fri, 23 Feb 2018 20:23:03 +0000 (12:23 -0800)]
Adding Listsecret capability

A GET HTTP request on domainname/secret will now list
all the secret names stored in that domain
The content of the secrets are not returned here.

Issue-ID: AAF-140
Change-Id: I0e0491f642e1ff82f11cb90a93df4a71393bc5ac
Signed-off-by: Kiran <kiran.k.kamineni@intel.com>
6 years agoAdding deletesecret functionality 37/32737/1
Kiran [Fri, 23 Feb 2018 23:11:48 +0000 (15:11 -0800)]
Adding deletesecret functionality

Adding deletesecret functionality in backend and handler

Issue-ID: AAF-142
Change-Id: I09dfc78af72dff1d60ce25cc22053d72948f7433
Signed-off-by: Kiran <kiran.k.kamineni@intel.com>
6 years agoCheck before enabling approle 21/32721/1
Kiran [Fri, 23 Feb 2018 20:55:57 +0000 (12:55 -0800)]
Check before enabling approle

Check to see if approle is not already enabled
before enabling it. This prevents error messages on
the vault server side

Issue-ID: AAF-141
Change-Id: Ic5a0401f72385fb66d19d34da2ab38ea57ea44bc
Signed-off-by: Kiran <kiran.k.kamineni@intel.com>
6 years agoGet Secret implementation 45/32645/1
Kiran [Thu, 22 Feb 2018 22:53:58 +0000 (14:53 -0800)]
Get Secret implementation

Completing getsecret backend implementation and handler call
Also adding in checktoken call before secret is read from vault

Issue-ID: AAF-137
Change-Id: Ia987af51c039290d1a06b7e2b4a8aa6a63e469c6
Signed-off-by: Kiran <kiran.k.kamineni@intel.com>
6 years agoCreateSecret implementaion 43/31943/4
vamshi.nemalikonda [Thu, 22 Feb 2018 10:44:25 +0000 (10:44 +0000)]
CreateSecret implementaion

Implementaion code added for createsecret method
Updated handler.go to check return value from createsecret
Added checktoken before write secret

Issue-ID: AAF-126
Change-Id: Ia46a0f1be5904072da74e04d123f88b09b46ed69
Signed-off-by: vamshi.nemalikonda <vn00480215@techmahindra.com>