Skip to content

Commit

Permalink
kbs: api_server: add attestation_service to auth callback
Browse files Browse the repository at this point in the history
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
  • Loading branch information
mythi committed May 29, 2024
1 parent 4b0b47f commit fdbaa41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions kbs/src/api/src/http/attest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pub(crate) async fn auth(
request: web::Json<Request>,
map: web::Data<SessionMap>,
timeout: web::Data<i64>,
_attestation_service: web::Data<Arc<AttestationService>>,
) -> Result<HttpResponse> {
info!("Auth API called.");
debug!("Auth Request: {:?}", &request);
Expand Down
3 changes: 2 additions & 1 deletion kbs/src/api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ impl ApiServer {
cfg_if::cfg_if! {
if #[cfg(feature = "as")] {
server_app = server_app.app_data(web::Data::clone(&sessions))
.app_data(web::Data::clone(&attestation_service)).service(web::resource(kbs_path!("auth")).route(web::post().to(http::auth)))
.app_data(web::Data::clone(&attestation_service))
.service(web::resource(kbs_path!("auth")).route(web::post().to(http::auth)))
.service(web::resource(kbs_path!("attest")).route(web::post().to(http::attest)))
.service(
web::resource(kbs_path!("attestation-policy"))
Expand Down

0 comments on commit fdbaa41

Please sign in to comment.