问题标签 [credentials]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
vb.net - Process.Start 上的“目录名称无效”错误?
我正在编写一个启动程序,当我开始该过程时,我收到“目录名称无效”错误。这是启动该过程的代码:
我在这里看到另一个问题,我需要设置 WorkingDirectory(在我开始搜索之前我得到了错误)。即使我设置了此属性,我仍然收到错误消息。有什么想法吗?
更多信息
我还应该注意我的 Z:\ 在我的网络上。我有一个解析 UNC 路径的函数。当我在 DEBUG_ROOT 上运行这个函数时,我得到了同样的错误。
我尝试将应用程序移至 c:\kiosk。结果相同。我以我模拟的用户身份登录,因此我可以访问所有共享和文件。
这是链接,由于某种原因,URL 格式想要消耗指定链接后的所有文本:
api - 最佳实践 - 是否存储 Twitter 凭据?
我希望能够让我的用户能够在我的网站上的个人资料中显示他们最近的推文。
我有一个 PHP twitter 包装器并了解如何进行 API 调用等,但我只是想知道如何管理用户信息。
这里的最佳做法是什么?我希望他们能够一次输入他们的凭据,但我想自己存储每个人的用户名/密码并不是最好的方法。
- 有没有办法进行一次经过身份验证的调用,并让 Twitter 记住它?
- 我应该存储用户名/密码,然后在显示推文时拨打电话吗?
这里的任何建议都会很棒。
谢谢,
c# - System.Net.CredentialCache.DefaultCredentials 中的密码是如何加密的?
如果我使用 system.net.credentialcache.defaultcredentials 将当前用户凭据传递给 Web 服务,信息将以哪种方式传输?我认为它不会是明文,因此必须对凭据进行加密,但是它们如何呢?
.net - 带有客户端凭据的 SSL 上的 HttpWebRequest
我正在尝试使用 HttpWebRequest 获取需要用户名和密码的 https URI。如果我将 URI 放入浏览器,它会弹出一个对话框,询问凭据然后工作。使用 HttpWebRequest 给我一个 401 Unauthorized 错误。
NetworkCredentials 的文档说它不支持 SSL,但我找不到我应该使用的东西。
wcf - 如何在 WCF 客户端配置文件中指定 Windows 凭据
我有一个使用带有 Windows 身份验证的 BasicHttpBinding 的 WCF 服务。大多数客户端是域帐户并使用其默认凭据连接到服务。
现在我想从在本地帐户下运行的 ASP.NET 客户端连接到服务。我想使用 ASP.NET 应用程序可用的 Windows 凭据(域\用户和密码)连接到 WCF 服务。
我知道我可以使用 ClientBase<T>.ClientCredentials 在代码中做到这一点。
有没有办法在客户端的 web.config 文件中指定凭据(域\用户和密码),这样我就不必更改代码?
编辑
如果无法在配置文件中完成,有没有办法使用 System.Net.ICredentials 或 System.Net.NetworkCredential 作为 WCF 服务的凭据?
.NET Framework 将这些作为提供网络凭据的同质方式提供,但对于 WCF,这似乎已被抛弃,取而代之的是基于不相关 System.ServiceModel.Description.ClientCredentials 类的新不兼容系统。
编辑 2
接受 Marc 对原始问题的回答 - 在客户端配置文件中似乎没有办法做到这一点:(
我认为这是 WCF 的一个缺陷——我不接受微软应该故意阻止我们将凭据放入配置文件中——毕竟它们必须存储在某个地方,并且框架包括用于加密配置文件的工具。我想我可以为此创建一个自定义的 BehaviorExtensionElement,但它应该是开箱即用的。
这也有点不一致:system.net/mailSettings/smtp/network 配置元素允许指定凭据,那么为什么不使用 WCF?
关于使用 System.Net.NetworkCredential 的第二个问题,从这个博客看来,至少在使用 Windows 身份验证时,可以使用以下代码:
configuration - 外部化 Grails 数据源配置
Grails 1.x 允许通过设置grails.config.locations指令来使用外部配置文件。是否有类似的方法可用于将 Datasource.groovy 中的数据库配置外部化(无需设置 JNDI)?
能够在应用程序外部的简单配置文件中配置数据库凭据将被证明是有帮助的。
提前致谢!
perl - 如何使用 Perl 中的 Integrated Windows Auth 将当前登录用户的凭据传递给 Web 服务
我在尝试使用 Perl 做一些需要 C# 中的几行代码的事情时遇到了令人沮丧的事情,即在需要集成 Windows 身份验证的 Windows 服务器上调用 Web 服务。
我找到的最有可能成功的候选者是一个名为 LWP::Authen::Ntlm 的模块,但我在谷歌上搜索的所有示例都要求您明确提供用户名、密码和域。我不想这样做 - 我只想请求使用当前登录用户的凭据,即 .NET 中的 CredentialCache.DefaultCredentials。
你们中的任何一位 Perl 大师都曾经这样做过吗?
谢谢。
c# - 使用 C# 访问 Windows 计划任务
如何使用 C#.NET 更改计划任务使用的凭据?
web-services - Using DefaultCredentials and DefaultNetworkCredentials
We're having a hard time figuring how these credentials objects work. In fact, they may not work how we expected them to work. Here's an explanation of the current issue.
We got 2 servers that needs to talk with each other through webservices. The first one (let's call it Server01
) has a Windows Service running as the NetworkService account. The other one Server02
has ReportingServices running with IIS 6.0. The Windows Service on Server01
is trying to use the Server02
ReportingServices WebService to generate reports and send them by email.
So, here's what we tried so far.
Setting the credentials at runtime (This works perfectly fine):
Now, if we could use a generic user all would be fine, however... we are not allowed to. So, we are trying to use the DefaultCredetials or DefaultNetworkCredentials and pass it to the RS Webservice:
Or:
Either way won't work. We're always getting 401 Unauthrorized from IIS. Now, what we know is that if we want to give access to a resource logged as NetworkService, we need to grant it to DOMAIN\MachineName$
(http://msdn.microsoft.com/en-us/library/ms998320.aspx):
Granting Access to a Remote SQL Server
If you are accessing a database on another server in the same domain (or in a trusted domain), the Network Service account's network credentials are used to authenticate to the database. The Network Service account's credentials are of the form DomainName\AspNetServer$, where DomainName is the domain of the ASP.NET server and AspNetServer is your Web server name.
For example, if your ASP.NET application runs on a server named SVR1 in the domain CONTOSO, the SQL Server sees a database access request from CONTOSO\SVR1$.
We assumed that granting access the same way with IIS would work. However, it does not. Or at least, something is not set properly for it to authenticate correctly.
So, here are some questions:
We've read about "Impersonating Users" somewhere, do we need to set this somewhere in the Windows Service ?
Is it possible to grant access to the NetworkService built-in account to a remote IIS server ?
Thanks for reading!
authentication - Wordpress 存储用户身份验证数据的方式背后的细节是什么?
首先,让我定义最终目标:
我想使用 Wordpress(2.8 版)来管理网站的身份验证数据/凭据和访问控制。Wordpress 将用于大部分站点,但某些页面将在 Wordpress 环境之外构建。这些页面应该能够使用存储在 Wordpress 数据库中的用户身份验证数据作为参考来做出自己的访问决定。
所以,问题:
Wordpress 究竟如何在其数据库中存储用户身份验证数据?
这个答案的第一部分很简单,在 Wordpress 数据库中,有一个包含主要用户数据的表。我相信这个表的默认名称是“wp_users”,但这可能会根据 Wordpress 的设置方式而改变。该表包含分别保存用户名和密码数据的字段“user_login”和“user_pass”。
“user_login”只是一个纯文本字段,因此很容易访问,但密码是加盐和散列的。这导致了仍然需要确定的第一件事:Wordpress 用于生成存储在“user_pass”中的字符串的加盐和散列过程是什么?
保持开放的另一部分是 Wordpress 存储其“角色”的位置/方式。在我的安装中,这些角色默认为:管理员、编辑、作者、贡献者和订阅者。我没有看到这些角色如何与单个用户相关联。另外,这些角色可以改变吗?
因此,回顾一下,真正的问题分为三个部分:
1) Wordpress 将用户的纯文本密码转换为存储在“wp_users”数据库表的“user_pass”列中的字符串的具体方法是什么?
2) 个人用户与其各自的 Wordpress“角色”之间的链接存储在哪里?
3) 可以修改 Wordpress 中的“角色”以更改其名称和/或添加/删除它们吗?
注意:我意识到另一种方法是让非 Wordpress 页面检查 Wordpress cookie 以确定访问权限。我将沿着这些思路创建另一个问题,但就这个问题而言,重点是非 Wordpress 页面如何利用实际的 Wordpress 数据库来决定访问控制。