Page MenuHomePhabricator

D11124.id37420.diff
No OneTemporary

D11124.id37420.diff

diff --git a/services/identity/src/constants.rs b/services/identity/src/constants.rs
--- a/services/identity/src/constants.rs
+++ b/services/identity/src/constants.rs
@@ -163,12 +163,13 @@
pub const OPAQUE_SERVER_SETUP: &str = "OPAQUE_SERVER_SETUP";
-// Opensearch Domain
+// Identity Search
pub const OPENSEARCH_ENDPOINT: &str = "OPENSEARCH_ENDPOINT";
pub const DEFAULT_OPENSEARCH_ENDPOINT: &str =
"identity-search-domain.us-east-2.opensearch.localhost.local
stack.cloud:4566";
+pub const IDENTITY_SEARCH_INDEX: &str = "users";
// Tunnelbroker
pub const TUNNELBROKER_GRPC_ENDPOINT: &str = "TUNNELBROKER_GRPC_ENDPOINT";
diff --git a/services/identity/src/websockets/mod.rs b/services/identity/src/websockets/mod.rs
--- a/services/identity/src/websockets/mod.rs
+++ b/services/identity/src/websockets/mod.rs
@@ -10,9 +10,9 @@
use hyper_tungstenite::tungstenite::Message;
use hyper_tungstenite::HyperWebsocket;
use identity_search_messages::{
- ConnectionInitializationResponse, ConnectionInitializationStatus, IdentitySearchFailure,
- Heartbeat, IdentitySearchUser, MessagesToServer, IdentitySearchMethod,
- IdentitySearchResponse, IdentitySearchResult,
+ ConnectionInitializationResponse, ConnectionInitializationStatus, Heartbeat,
+ IdentitySearchFailure, IdentitySearchMethod, IdentitySearchResponse,
+ IdentitySearchResult, IdentitySearchUser, MessagesToServer,
};
use serde::{Deserialize, Serialize};
use tokio::net::TcpListener;
@@ -23,7 +23,8 @@
use crate::config::CONFIG;
use crate::constants::{
- IDENTITY_SERVICE_WEBSOCKET_ADDR, SOCKET_HEARTBEAT_TIMEOUT,
+ IDENTITY_SEARCH_INDEX, IDENTITY_SERVICE_WEBSOCKET_ADDR,
+ SOCKET_HEARTBEAT_TIMEOUT,
};
use send::{send_message, WebsocketSink};
pub mod errors;
@@ -154,8 +155,10 @@
},
};
- let opensearch_url =
- format!("https://{}/users/_search/", &CONFIG.opensearch_endpoint);
+ let opensearch_url = format!(
+ "https://{}/{}/_search/",
+ &CONFIG.opensearch_endpoint, IDENTITY_SEARCH_INDEX
+ );
let search_response = send_search_request(&opensearch_url, prefix_query)
.await?

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 19, 12:16 AM (19 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2674875
Default Alt Text
D11124.id37420.diff (2 KB)

Event Timeline