Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3485691
D11124.id37420.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D11124.id37420.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D11124: [identity] create constant IDENTITY_SEARCH_INDEX
Attached
Detach File
Event Timeline
Log In to Comment