use of com.att.aro.core.bestpractice.pojo.ForwardSecrecyEntry in project VideoOptimzer by attdevsupport.
the class ARODiagnosticsOverviewRouteImpl method updateDiagnosticsTab.
@Override
public void updateDiagnosticsTab(Object routeInfo) {
int oldPanelIndex = jtabbedPane.getSelectedIndex();
jtabbedPane.setSelectedIndex(DIAGNOSTIC_INDEX);
DiagnosticsTab diagnosticsTab = (DiagnosticsTab) jtabbedPane.getSelectedComponent();
if (routeInfo == null) {
jtabbedPane.setSelectedIndex(oldPanelIndex);
LOG.error("Diagnostics Tab needs a type for updating");
return;
}
LOG.debug("Type used to route to Diagnostics Tab: " + routeInfo.getClass().getSimpleName());
if (routeInfo instanceof CacheEntry) {
diagnosticsTab.setHighlightedTCP(((CacheEntry) routeInfo).getHttpRequestResponse());
} else if (routeInfo instanceof Session) {
diagnosticsTab.setHighlightedTCP(((Session) routeInfo));
} else if (routeInfo instanceof HttpRequestResponseInfo) {
diagnosticsTab.setHighlightedTCP((HttpRequestResponseInfo) routeInfo);
} else if (routeInfo instanceof HttpEntry) {
diagnosticsTab.setHighlightedTCP(((HttpEntry) routeInfo).getHttpRequestResponse());
} else if (routeInfo instanceof DisplayNoneInCSSEntry) {
diagnosticsTab.setHighlightedTCP(((DisplayNoneInCSSEntry) routeInfo).getHttpRequestResponse());
} else if (routeInfo instanceof ImageMdataEntry) {
diagnosticsTab.setHighlightedTCP(((ImageMdataEntry) routeInfo).getHttpRequestResponse());
} else if (routeInfo instanceof ImageCompressionEntry) {
diagnosticsTab.setHighlightedTCP(((ImageCompressionEntry) routeInfo).getHttpRequestResponse());
} else if (routeInfo instanceof MultipleConnectionsEntry) {
if (((MultipleConnectionsEntry) routeInfo).isMultiple()) {
jtabbedPane.setSelectedIndex(WATERFALL_INDEX);
WaterfallTab waterfallTab = (WaterfallTab) jtabbedPane.getSelectedComponent();
waterfallTab.updateGraph(((MultipleConnectionsEntry) routeInfo).getHttpReqRespInfo());
} else {
if (((MultipleConnectionsEntry) routeInfo).getHttpReqRespInfo().getSession() != null) {
diagnosticsTab.setHighlightedSessionTCP(((MultipleConnectionsEntry) routeInfo).getHttpReqRespInfo());
} else {
diagnosticsTab.setHighlightedTCP(((MultipleConnectionsEntry) routeInfo).getHttpReqRespInfo());
}
}
} else if (routeInfo instanceof SpriteImageEntry) {
diagnosticsTab.setHighlightedTCP(((SpriteImageEntry) routeInfo).getHttpRequestResponse());
} else if (routeInfo instanceof UnnecessaryConnectionEntry) {
UnnecessaryConnectionEntry unConnectionEntry = (UnnecessaryConnectionEntry) routeInfo;
diagnosticsTab.setHighlightedTCP(unConnectionEntry.getLowTime());
} else if (routeInfo instanceof TransmissionPrivateDataEntry || routeInfo instanceof UnsecureSSLVersionEntry || routeInfo instanceof ForwardSecrecyEntry) {
diagnosticsTab.setHighlightedTCP(routeInfo);
} else if (routeInfo instanceof VideoStall) {
double timestamp = ((VideoStall) routeInfo).getSegmentTryingToPlay().getStartTS();
diagnosticsTab.getGraphPanel().setGraphView(timestamp, true);
diagnosticsTab.getVideoPlayer().setMediaTime(timestamp);
} else {
jtabbedPane.setSelectedIndex(oldPanelIndex);
LOG.error("Diagnostics Tab cannot handle a type of " + routeInfo.getClass().getSimpleName() + " for updating");
}
}
use of com.att.aro.core.bestpractice.pojo.ForwardSecrecyEntry in project VideoOptimzer by attdevsupport.
the class DiagnosticsTab method setHighlightedTCP.
// only for security best practice table route
public void setHighlightedTCP(Object routeInfo) {
double timestamp = -1;
String destIP = null;
if (routeInfo instanceof TransmissionPrivateDataEntry) {
TransmissionPrivateDataEntry entry = (TransmissionPrivateDataEntry) routeInfo;
timestamp = entry.getSessionStartTime();
destIP = entry.getDestIP();
} else if (routeInfo instanceof UnsecureSSLVersionEntry) {
UnsecureSSLVersionEntry entry = (UnsecureSSLVersionEntry) routeInfo;
timestamp = entry.getSessionStartTime();
destIP = entry.getDestIP();
} else if (routeInfo instanceof ForwardSecrecyEntry) {
ForwardSecrecyEntry entry = (ForwardSecrecyEntry) routeInfo;
timestamp = entry.getSessionStartTime();
destIP = entry.getDestIP();
}
if (timestamp == -1 || destIP == null) {
LOGGER.warn("invalid route information");
return;
}
for (Session session : sessionsSortedByTimestamp) {
if (session != null && session.getRemoteIP() != null) {
if (session.getSessionStartTime() == timestamp && destIP.equals(session.getRemoteIP().getHostAddress())) {
setHighlightedTCP(session);
return;
}
}
}
LOGGER.warn("No session found to route to Diagnostic Tab for timestamp " + timestamp);
}
use of com.att.aro.core.bestpractice.pojo.ForwardSecrecyEntry in project VideoOptimzer by attdevsupport.
the class BpSecurityForwardSecrecyTablePanel method getContentTable.
@SuppressWarnings("unchecked")
@Override
public DataTable<ForwardSecrecyEntry> getContentTable() {
if (contentTable == null) {
contentTable = new DataTable<ForwardSecrecyEntry>(tableModel);
contentTable.setName(ResourceBundleHelper.getMessageString("security.forward.secrecy.tableName"));
contentTable.setAutoCreateRowSorter(true);
contentTable.setGridColor(Color.LIGHT_GRAY);
contentTable.setRowHeight(ROW_HEIGHT);
contentTable.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);
TableRowSorter<TableModel> sorter = new TableRowSorter<>(tableModel);
contentTable.setRowSorter(sorter);
sorter.setComparator(0, Util.getDomainSorter());
DataTablePopupMenu popupMenu = (DataTablePopupMenu) contentTable.getPopup();
popupMenu.initialize();
}
return contentTable;
}
use of com.att.aro.core.bestpractice.pojo.ForwardSecrecyEntry in project VideoOptimzer by attdevsupport.
the class ForwardSecrecyImpl method populateEntry.
private ForwardSecrecyEntry populateEntry(Session session, String cipher) {
ForwardSecrecyEntry entry = new ForwardSecrecyEntry();
entry.setDestIP(session.getRemoteIP().getHostAddress());
entry.setDestPort(String.valueOf(session.getRemotePort()));
entry.setCipherHex(cipher);
entry.setCipherName(ForwardSecrecyUtil.getCipherIdentifier(cipher).name());
entry.setSessionStartTime(session.getSessionStartTime());
return entry;
}
use of com.att.aro.core.bestpractice.pojo.ForwardSecrecyEntry in project VideoOptimzer by attdevsupport.
the class ForwardSecrecyImpl method runTest.
@Override
public AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata) {
Set<ForwardSecrecyEntry> entries = new HashSet<>();
List<Session> sessions = tracedata.getSessionlist();
for (Session session : sessions) {
String selectedCipher = getSelectedCipherInSession(session);
if (selectedCipher != null) {
entries.add(populateEntry(session, selectedCipher));
}
}
return getTestResult(entries);
}
Aggregations