LabVIEW网络服务安全2

简介: LabVIEW网络服务安全2

LabVIEW网络服务安全2

在客户端应用程序中创建签名

对请求进行签名要求您具有能够从客户端的编程语言调用的MD5摘要算法以及SHA256加密摘要算法的实现。这两种算法通常都可用于大多数平台。还需要:

1. 要使用的HTTP方法的字符串(“GET”、“POST”、“PUT”、“DELETE”)


2. 目标IP地址(或DNS主机名)


3. 在该地址请求的网址


4. HTTP内容正文(可能出现在“PUT”或“POST”请求中)


5. 当前时((in UTCtime using format ‘YYYY-MM-DD HH:MM:SSZ’)


6. 安全密钥的两个元素(访问ID和密钥ID)


例如,给定以下HTTP请求:


Method = GET


Time = 2008-07-23 22:41:02Z


URL = /quotes/NATI


1. 客户端创建许多单独的字符串元素,这些元素将连接在一起。这些元素是:


要使用的HTTP方法的字符串(“GET”、“POST”、“PUT”、“DELETE”)


“GET”


2. URL请求


'/quotes/NATI'


3. 当前时间(以UTC时间使用格式“YYYY-MM-DDHH:MM:SSZ”)


'2008-07-2322:41:02Z'


4. The Access ID portion of the Security Key


1. 'PqVr/ifkAQh+lVrdPIykXlFvg12GhhQFR8H9cUhphgg=' the default Access ID的机密The clientcreates a number of individual string elements that will get concatenatedtogether. These elements are:


The string for the HTTP method to be used (‘GET’, ‘POST’, ‘PUT’, ‘DELETE’)


‘GET’


2. The URL requested


'/quotes/NATI'


3. The current time of day (in UTC time using format‘YYYY-MM-DD HH:MM:SSZ’)


‘2008-07-23 22:41:02Z’


4. The Access ID portion of the Security Key


'PqVr/ifkAQh+lVrdPIykXlFvg12GhhQFR8H9cUhphgg=' ß the defaultAccess ID


5. The hex-encoded MD5 digest of the Secret ID portion ofthe Security Key


Given: 'pTe9HRlQuMfJxAG6QCGq7UvoUpJzAzWGKy5SbZ+roSU=' ß the defaultSecret ID


‘4ce83e7d608f70375fd1cda0a6f3ae66’ ß the hex-encodedMD5 digest of the Secret ID string


6. The hex-encoded MD5 digest of the content-body if thereis a content-body for the request (Not applicable for this request becausethere is no content-body for a GET request).


Appendedtogether, these give us a string of:


‘GET/quotes/NATI2008-07-23


22:41:02ZPqVr/ifkAQh+lVrdPIykXlFvg12GhhQFR8H9cUhphgg=4ce83e7d608f70375fd1cda0a6f3ae66’


为了形成最终签名,我们一起附加:


1. ‘NIWS’ (for requests with no content-body, or forrequests in which we do not want to include the content-body as part of thesignature) or ‘NIWS2’ (for requests with a content body).


2. A blank space (0x20).


3. The Access ID


4. A colon (0x3a)


5. The Base64-encoded SHA256 digest, as calculated above.


Thisgives us the signature string:


‘PqVr/ifkAQh+lVrdPIykXlFvg12GhhQFR8H9cUhphgg=:xTDFuYyLJpwOLL2bKKlAco59W/0N53BnVwOGNZ0fX


l0=’


Thissignature string is added to the HTTP request as a header named:“x-ni-authentication”.


Thetimestamp string used to create this signature is also attached to thesignature as a header named “x-ni-date”.


So acomplete signed HTTP request (with ‘\n’ shown to represent the requiredcarriage returns) would look like:


GET/quotes/NATI HTTP/1.1 ‘\n’


x-ni-date:2008-07-23 22:41:02Z ‘\n’


x-ni-authentication:NIWSPqVr/ifkAQh+lVrdPIykXlFvg12GhhQFR8H9cUhphgg=:xTDFuYyLJpwOLL2bKKlAco59W/0N53BnVwOGNZ0fXl0=‘\n’


Thissignature, embedded as HTTP headers, is only for this request. It could onlyhave been


createdby someone who knew the algorithm and both parts of the Security Key. Plus, thesignature includes an encoded version of the timestamp, so the signature has abuilt-in expiration time, as configured on the LabVIEW target. Outside of thattime window, this signature is automatically invalid, preventing later replaysof the request.


Note thatthe timestamp calculations require that the clock be properly set on both theclient and the LabVIEW target. Because the timestamp string is written in UTCtime, the client and servers can each be in different time zones, as long astheir local clocks and time zones are correctly set.


需要说明的是,上述的例程和文档,都是可以下载的,双击即可打开,其中压缩文件是可以采用粘贴复制的方式,拷贝到硬盘上。这不是图片,各位小伙伴看到后尝试一下,这个问题就不用加微信咨询了。有关LabVIEW编程、LabVIEW开发等相关项目,可联系们。附件中的资料这里无法上传,可去公司网站搜索下载。

相关文章
|
6天前
|
监控 安全 Cloud Native
企业网络架构安全持续增强框架
企业网络架构安全评估与防护体系构建需采用分层防御、动态适应、主动治理的方法。通过系统化的实施框架,涵盖分层安全架构(核心、基础、边界、终端、治理层)和动态安全能力集成(持续监控、自动化响应、自适应防护)。关键步骤包括系统性风险评估、零信任网络重构、纵深防御技术选型及云原生安全集成。最终形成韧性安全架构,实现从被动防御到主动免疫的转变,确保安全投入与业务创新的平衡。
|
6天前
|
运维 安全 网络安全
企业级通配符 SSL 证书:企业网络安全的坚实护盾
企业级通配符SSL证书是企业的网络“身份证”,一个证书即可保护主域名及所有子域名,简化管理流程。它采用先进加密算法,确保数据传输安全,防止黑客攻击。拥有此证书可提升网站信任度,增强品牌形象,吸引更多客户。同时,它灵活适配业务变化,降低成本,为企业数字化发展提供有力支持。
|
7天前
|
供应链 监控 安全
业务上云的主要安全风险及网络安全防护建议
业务上云面临数据泄露、配置错误、IAM风险、DDoS攻击、合规与审计、供应链及内部威胁等安全挑战。建议采取全生命周期加密、自动化配置检查、动态权限管理、流量清洗、合规性评估、供应链可信验证及操作审批等措施,构建“预防-检测-响应”一体化安全体系,确保数据保护、权限收敛、合规审计和弹性防护,保障云端业务安全稳定运行。
|
10天前
|
云安全 人工智能 安全
公共云网络安全即服务!阿里云稳居市占率第一!
公共云网络安全即服务!阿里云稳居市占率第一!
|
10天前
|
云安全 人工智能 安全
构建云上安全共同体 | 阿里云亮相2024年(第十三届)电信和互联网行业网络安全年会
构建云上安全共同体 | 阿里云亮相2024年(第十三届)电信和互联网行业网络安全年会
|
11天前
|
缓存 网络协议 安全
即时通讯初学者必知必会的20个网络编程和通信安全知识点
即时通讯IM应用开发的初学者很容易迷失在网络编程的复杂性以及通信安全的各种概念里,本文不涉及深度理论知识,尽量通过一句话或几句话让你快速了解20个相关的网络编程和通信安全知识点,希望能助你愉快地开始即时通讯应用开发。
26 0
|
2月前
|
安全 网络协议 网络安全
【Azure APIM】APIM服务配置网络之后出现3443端口不通,Management Endpoint不健康状态
如果没有关联的网络安全组,则阻止所有网络流量通过子网和网络接口。
65 30
|
3月前
|
运维 供应链 安全
阿里云先知安全沙龙(武汉站) - 网络空间安全中的红蓝对抗实践
网络空间安全中的红蓝对抗场景通过模拟真实的攻防演练,帮助国家关键基础设施单位提升安全水平。具体案例包括快递单位、航空公司、一线城市及智能汽车品牌等,在演练中发现潜在攻击路径,有效识别和防范风险,确保系统稳定运行。演练涵盖情报收集、无差别攻击、针对性打击、稳固据点、横向渗透和控制目标等关键步骤,全面提升防护能力。
|
3月前
|
云安全 人工智能 安全
|
3月前
|
存储 安全 网络安全
云计算与网络安全:探索云服务的安全挑战与策略
在数字化的浪潮下,云计算成为企业转型的重要推手。然而,随着云服务的普及,网络安全问题也日益凸显。本文将深入探讨云计算环境下的安全挑战,并提出相应的防护策略,旨在为企业构建安全的云环境提供指导。

热门文章

最新文章