问题标签 [authorization]

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.

0 投票
1 回答
474 浏览

ruby-on-rails - Contextual ActiveRecord Model filtering

Throughout our site there's a common model, let's say Video, that has a number of attributes like private/public/pending, downloadable, etc.

Based on the controller, action, request parameters and current user, we want to filter out particular videos from display. For instance, on the homepage we only want to show videos that are public. If there is a logged in user on the homepage we also want to show public downloadable videos.

We also want to make sure that these filters can be applied through sql queries alone, so that using Sphinx we can filter out undesired videos when a user does a search on the site.

Is this best handled through an authorization plugin, such as rails-authorization-plugin? Bottom line our goal is to prevent programmers from accidentally forgetting to filter out particular videos when they add a new action. The solution we're looking for should be very programmatic.

Here's a solution I'm thinking of (haven't written any code yet)

  1. Make use of an authroization plugin or roll our own that allows setting which videos are displayed, defined at the controller or action level.

  2. Create an association extension for any model that has_many(:videos) or has_one(:video), which allows us to overload the finder for videos in the association.

  3. Overload Video.find in a similar manner to restrict what to display based on the current rules.

0 投票
3 回答
4325 浏览

.net - ASP.NET 页面授权...你是怎么做的?

我目前正在研究 asp.net 中标准页面授权配置的替代解决方案。

如果您有需要相同访问策略的文件目录,则位置标签可以正常工作,但如果您有很多单独的访问策略,则位置标签很麻烦。我可以推出自己的自定义身份验证系统,但如果可以避免,那可能会更好。

目前,我们正在为页面内容使用类似 azman 的基于权限的授权系统,但我还没有找到一种将其与标准页面安全性集成的好方法。

关于如何做到这一点的任何建议?有没有集成 azman 和 asp.net 页面授权的解决方案?还有其他我应该注意的标准解决方案吗?

0 投票
1 回答
688 浏览

asp.net - 用于授权私有用户文件夹的 Web.config

我有一个包含数千个用户文件夹的私人文件夹,只有正确的用户才能访问。没有用户可以访问其他用户的文件夹。我只能想到为每个用户的子文件夹创建一个 web.config 授权规则。在这种情况下,我不必在一个 web.config 文件中为每个用户添加所有规则。

我想知道是否有任何其他方法可以通过仅使用一个 web.config 而不是为每个用户创建一个唯一的 web.config 文件来解决此问题。

0 投票
6 回答
4976 浏览

authorization - OAuth 替代方案?

我一直在研究 OAuth 以将我站点中的资源共享给其他站点。但是,前几天报告了OAuth规范的漏洞。 http://oauth.net/advisories/2009-1

许多站点决定停止 OAuth,直到发布固定版本。

目前,我们可以有任何替代 OAuth 的方法吗?我想要一个开放标准且安全的授权协议。

0 投票
1 回答
93 浏览

apache - 为系统密码配置apache?

我知道我可以使用 htpasswd 为 apache 创建密码文件,但是如何配置它以使用系统中的有效用户或组?

0 投票
3 回答
3553 浏览

security - 集中授权服务?

有没有可用的开源集中授权服务?认证信息集中的解决方案有很多(例如:CASJOSSO),但是授权信息呢?

有一些非常好的授权框架(例如:Spring Security(以前称为 Acegi)和Seam Security),但似乎我必须将它们组合成单独的层或服务。换句话说,我不能很容易地独立运行它们。对于 SOA,不仅集中身份验证而且集中授权信息(即:角色、权限、规则等)似乎是非常有价值的。

有什么建议么?

0 投票
2 回答
3411 浏览

iphone - 有哪些选项可以通过 iPhone 接受信用卡付款?

从 iPhone 应用程序接受信用卡付款的选项有哪些?这将是一个独立的应用程序,而不是 iPhone 特定的网站。我可以与Authorize.net之类的支付网关集成吗?贝宝或谷歌结账呢?我知道在某些网站上,它会将您带到贝宝网站以获得付款授权 - 这可以通过 http 请求完成,而不是强迫用户访问另一个网站(该应用程序无法使用该网站)?由于您无法安装 SSL 证书,因此来自 iPhone 的这些付款是否存在任何安全问题?

我不想使用 3.0 版本中将提供的 Apple 小额支付,因为会有很多小额费用,我不想每次都给 Apple 30%。

这是否可能,或者我是否需要客户事先在我的网站上创建一个帐户,用他们的信用卡付款,然后让 iPhone 与我的数据库交互以获得他们的可用余额(他们通过网络收取的金额)?

0 投票
3 回答
987 浏览

php - 我的 PHP 脚本中是否存在任何会话安全漏洞?

在我验证用户登录信息后,我为他们创建了这个会话:

然后,我像这样重定向它们:

我希望我的网站有一个美容网址,例如:www.domain.com/profile/userName

因此,在我所有的重定向链接(HTML<a>标记或 PHPheader()函数)中,我将使用:

是否存在安全漏洞?

编辑:

我需要先使用创建会话 IDsession_id()吗?

所以,要检查:

0 投票
4 回答
136851 浏览

asp.net - 为什么是包含在以下示例中?

?通配符代表未经身份验证的用户,而*代表所有用户,经过身份验证和未经身份验证。我的书展示了以下 URL 授权示例:


但是上面的代码是否与以下代码具有相同的效果:

<deny users="?" />或者作者是否出于某种原因也包括 规则?

0 投票
2 回答
139 浏览

asp.net - 通过控制对特定文件的访问


A) 我们还可以使用<location>标签控制对特定文件的访问。为什么 <location>元素不包含在<system.web>标签内,而是直接嵌套在<configuration>元素内?


B)我意识到<system.web>元素用于 Asp.Net 设置,但为什么<location> 还包含<system.web>?是否指定内部指定的设置<system.web>仅适用于文件包含在 Asp.Net 应用程序中的情况?

如果是这样,那么这是否表明该<location>元素也可以用于非 Asp.Net 应用程序?


谢谢