Questions tagged [policy]

Best practice and style are at the core of every program; there is always a better way to do something. Policy helps programmers determine how something should be written.

Policy is a more or less ambiguous way of describing the best way to do something in programming. This can often be described as "best practice" when writing a program. This can pertain to the way a method returns a value, the way inheritance is structured, and the way to exit a loop, among other things, and it can vary from language to language.

Many companies often have their own sets of internal documentation referred to as Coding Standards that enforce policies which they determine to be valuable for maintenance and readability purposes of their code base.

You can learn more about policy and programming paradigm here.

1311 questions
9
votes
2 answers

AWS IAM user policy to restrict access to specific SQS queue

I'm trying to setup a user policy for a AWS IAM user to access a specific AWS SQS queue. When I try with below policy, I get the error AccessDenied. { "Statement": [ { "Action": ["sqs:*"], "Effect": "Allow", "Resource":…
infrared
  • 3,566
  • 2
  • 25
  • 37
8
votes
0 answers

Facebook Developer Policy 6.1: Verify that you have integrated Login correctly. Your app shouldn't crash or hang during the testing process

I'm using FB login in my app, the login works fine.But today I received an email from Facebook team. They're told me that our Android app is being affected. But I checked my crashlytics and also test on my live app. I could't find an issues. So, how…
Samad Talukder
  • 982
  • 11
  • 21
8
votes
1 answer

How to set feature policy headers in JS

I am getting the following errors in my console on my site: Error with Feature-Policy header: Unrecognized feature: 'unsized-media'. Error with Feature-Policy header: Unrecognized feature: 'ambient-light-sensor'. Error with Feature-Policy header:…
Paddy Hallihan
  • 1,624
  • 3
  • 27
  • 76
8
votes
3 answers

Custom message on Laravel policy authorization

In my Laravel 5.8 project I am implementing a reputation system similar to Stack Exchange's one: for example, users can reply to a discussion only if they have "Level 3" reputation. I wanted to use Laravel's policies system to build the permissions…
Marco Cazzaro
  • 661
  • 8
  • 13
8
votes
4 answers

Android Management API change Policy for device

I created 2 policies in my enterprise. I would like to switch one device to the other policy without re-enroling it. I tried to use android management enterprises devices.patch with following JSON { "policyName": "policy2" } this link When i…
chriss
  • 91
  • 6
8
votes
1 answer

How to sign code in the cloud after the new 2017 rules?

It has come to my attention that code signing certificates are from now on required to be paired with physical tokens. The Minimum Requirements specify that CAs shall ensure stronger protection for private keys. As such, all Code Signing…
Sander
  • 25,685
  • 3
  • 53
  • 85
8
votes
2 answers

Azure AD B2C customization template errors

I deleted my storage account which held the folder containing the B2C sign-in/sign-up policy custom UI files. Realizing my mistake, I created a new storage account and uploaded the policy files. I updated the paths in the policy configuration. Now,…
srm
  • 81
  • 1
  • 2
8
votes
1 answer

Restricting access to AWS S3 bucket based on referer

I'm trying to restrict access to a S3 bucket and only allowing certain domains from a list based on the referer. The bucket policy is basically: { "Version": "2012-10-17", "Id": "http referer domain lock", "Statement": [ { "Sid": "Allow…
8
votes
3 answers

device policy administration errors with Android

I recently started exploring the android device policy administration APIs and have run into a bit of a wall. i'm having problems simply enabling the device administration. I'm fairly certain it is a problem with the manifest entry, however I can't…
Jainathan Leung
  • 1,147
  • 2
  • 15
  • 27
8
votes
2 answers

How to read iptables TRACE logs (policy numbers)

So I added sudo iptables -t raw -A PREROUTING -p tcp --dport 25 -j TRACE as well as sudo iptables -t raw -A OUTPUT -p tcp --dport 25 -j TRACE and when I grep my syslog for TRACE I get output that looks like this Jan 19 09:14:46 dev109 kernel:…
loonyuni
  • 1,373
  • 3
  • 16
  • 24
8
votes
2 answers

AWS IAM Policy to allow user to create IAM Roles (from Management Console & AWS CLI)

I've searched quite a bit but cannot find a policy to allow a user to create IAM Roles from both the management console (AWS website), and from AWS CLI. Any help is greatly appreciated EDIT: More clarification, the end-goal is to allow the user to…
Fadi
  • 1,329
  • 7
  • 22
  • 40
8
votes
2 answers

Internal error in Changeset Comments Policy after updating VS2015 to Update 1

Everything was fine about an hour ago, when i tried to checkin something, the policy friendly reminded me to "provide a comment for the check-in". Then I installed VS2015 Update 1, like some of my colleagues did, and after that, i receive the…
Andreas
  • 478
  • 4
  • 16
8
votes
2 answers

AWS policy that limit the IAM user to send SES emails from a specific sender

It is possible to use IAM credentials to allow to send mails from specific sender? I mean, for example, I have two different domains and senders configurated into SES: info@example1.com and info@example2.com. Is there any way to limit a IAM user and…
Pablo SL
  • 165
  • 1
  • 6
8
votes
5 answers

How to get Hudson CI to execute a Powershell script?

I'm using Hudson version 1.324 for CI and have a couple of issues: Environment: Windows Server 2008 Powershell v1.0 Hudson 1.324 running as a service Hudson Powershell Plugin installed Psake (aka. "Powershell Make/Rake" available from Github)…
user178557
  • 81
  • 1
  • 2
8
votes
1 answer

Reflection Security

How to enforce reflection security by not allow the Method, Field, Constructor object to call setAccessible(true) ? SecurityPolicy File or something else? Normally for stand-alone Java applications there is no SecurityManager registered. I using…
nicholas
  • 2,581
  • 14
  • 66
  • 104