summaryrefslogtreecommitdiffstats
path: root/sms-service
AgeCommit message (Collapse)AuthorFilesLines
2018-03-08Adding handler unit testsKiran Kamineni2-4/+153
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>
2018-03-08Adding url configuration for endpoint testsKiran Kamineni3-18/+44
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>
2018-03-08Dockerfile for SMS containerizationvamshi.nemalikonda1-0/+33
Building Dockerfile for SMS containerization - implemented review comments Issue-ID: AAF-147 Change-Id: I85030f461d6242d0bd4358dce7ac3b6d86edfd22 Signed-off-by: vamshi.nemalikonda <vn00480215@techmahindra.com>
2018-03-07Adding endpoint test scriptsKiran Kamineni5-0/+90
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>
2018-03-07Changing json encoding of responseKiran Kamineni1-4/+15
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>
2018-03-06Log errors to log fileKiran Kamineni2-13/+55
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>
2018-03-05Renamed config file to template fileKiran Kamineni1-0/+0
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>
2018-03-05Adding unseal backend supportKiran Kamineni4-15/+40
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>
2018-03-06Init role does not depend on vault stateKiran Kamineni5-48/+26
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>
2018-03-05Updating api documentationKiran Kamineni3-56/+816
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>
2018-03-01Adding logging frameworkKiran Kamineni3-0/+68
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>
2018-02-28Minor code cleanupKiran Kamineni1-21/+9
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>
2018-02-27Adding deletedomain implementationKiran Kamineni2-1/+17
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>
2018-02-27Fixing the usage of pointer in configKiran Kamineni2-2/+3
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>
2018-02-26Improved error handling during startupKiran Kamineni1-6/+20
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>
2018-02-24Merge "Adding Listsecret capability"Girish Havaldar4-1/+59
2018-02-23Adding Listsecret capabilityKiran4-1/+59
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>
2018-02-23Adding deletesecret functionalityKiran2-2/+18
Adding deletesecret functionality in backend and handler Issue-ID: AAF-142 Change-Id: I09dfc78af72dff1d60ce25cc22053d72948f7433 Signed-off-by: Kiran <kiran.k.kamineni@intel.com>
2018-02-23Check before enabling approleKiran1-1/+17
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>
2018-02-22Get Secret implementationKiran2-4/+29
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>
2018-02-22CreateSecret implementaionvamshi.nemalikonda4-13/+34
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>
2018-02-21Adding token creation for operationsKiran9-29/+197
Secret domain creation and secret creation is controlled using approle authentication within the sms service A temporary token with a short ttl is created and used for adding domains and secrets into vault right now Root token is used only once during the initial bring up Also fixing unit test for backend.go Issue-ID: AAF-99 Change-Id: I1352dadb32b54caaef86c7795601bf04d657dc3b Signed-off-by: Kiran <kiran.k.kamineni@intel.com>
2018-02-15Adding unit test case for auth.goHavaldar Girish2-0/+101
Adding Unit Test case auth_test.go and auth_test.cert file for testing auth.go Change-Id: I68611f2b17a9f37618cbc5ef8db11e6fb632b910 Issue-ID: AAF-122 Signed-off-by: Havaldar Girish <hg0071052@techmahindra.com>
2018-02-13Adding more unit tests and updating makefileKiran8-9/+247
Added unit tests for backend, vault, config and handler Updated the makefile to call the tests when build target is invoked Issue-ID: AAF-118 Change-Id: Id9b719a0e2b46070867a7fcbae34b83d19ef3282 Signed-off-by: Kiran <kiran.k.kamineni@intel.com>
2018-02-12Auth.go returns error during tlsconfigKiran2-6/+7
Auth package should return an error to the calling function instead of erroring out with log.Fatal Issue-ID: AAF-99 Change-Id: I9f1abd3710a85df85ac6e1d623dc16d77b977f1a Signed-off-by: Kiran <kiran.k.kamineni@intel.com>
2018-02-09Updating API DocumentKiran1-521/+182
API Document was old Updated with latest Issue-ID: AAF-121 Change-Id: Ifea35d2aad6e7d52fe73d02984e6d11b6cd89831 Signed-off-by: Kiran <kiran.k.kamineni@intel.com>
2018-02-09Adding Makefile for easier builds and ciKiran1-0/+25
Adding a Makefile to allow easier builds and for jenkins integration jenkins jjb will call make build, make deploy and so on Makefile resides along with the main application go file Issue-ID: AAF-117 Change-Id: Ibf4413a26d5572703bea122d3d0db83f4c35ae88 Signed-off-by: Kiran <kiran.k.kamineni@intel.com>
2018-02-09Refactor code and cleanup with stub completionKiran7-113/+215
Refactored code and moved some structs from handler to backend Completed the interface that is part of the backend Currently, the interface implementation is empty and will need to be fleshed out Issue-ID: AAF-99 Change-Id: I0083bc9d7ce7f6e5294339bf1e270b90c1b3de29 Signed-off-by: Kiran <kiran.k.kamineni@intel.com>
2018-02-05Initial Project StructureKiran11-0/+1120
Includes a directory stucture for all the current components The implemented code establishes a mTLS connection to client and serves a GET status request Other requests and handlers will come in future patches Issue-ID: AAF-102 Change-Id: Ib3bca066586d23330b10550f83772ab11aacabc7 Signed-off-by: Kiran <kiran.k.kamineni@intel.com>