AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 06.09.2018, 09:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
crmtipoftheday: Tip #1167: Impersonation does not grant extra powers
Источник: https://crmtipoftheday.com/1167/impe...-extra-powers/
==============

I did write before about impersonating users. It’s a very straightforward “manoeuvre” and is commonly used when there is a service account (could be either non-interactive user or, better, application user) that needs to act as a specific user. There is even a built-in role Delegate which contains an absolute minimum set of privileges required to impersonate someone, including coveted prvActOnBehalfOfAnotherUser privilege.

I did manage to shoot myself in a foot though. I created an application user, granted it Delegate role and fired away the test code creating a contact. Kaboom:

System.ServiceModel.FaultException`1: 'Principal user (Id=31ba5b71-82ad-e711-a823-000d3aa32537, type=8 , accessMode=0, roleCount=3 ) is missing prvCreateContact privilege (Id=a8bff87f-0df0-41d4-babd-f093faf1e32c)'

The user id was referring to the user being impersonated and that user definitely had permissions to create a contact. What the?

What happened is that I completely forgot one of the fundamental security principles:
One shall not pretend to be someone else to elevate permissions beyond of what they already have

Of course, it’s a case of RTFM, and I quote:
The actual set of privileges … is the intersection of the privileges… user (A) is allowed to do something if and only if user (A) and the impersonated user (B) have the privilege necessary for the action

Oh, well, system administrator role it is then… Just kidding.

(Facebook and twitter cover photo by Javardh on Unsplash)





Источник: https://crmtipoftheday.com/1167/impe...-extra-powers/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
crmtipoftheday: Tip #1126: Recycling Entities Does Not Always Make Sense Blog bot Dynamics CRM: Blogs 0 04.07.2018 18:12
crmtipoftheday: Tip #1107: Do not extend system users Blog bot Dynamics CRM: Blogs 0 19.04.2018 08:12
crmtipoftheday: Tip #1063: Do not touch currency system views Blog bot Dynamics CRM: Blogs 0 29.01.2018 04:21
Быстродействие метда TaxParameters::find Ace of Database DAX: Программирование 7 01.06.2017 11:46
wiki.dynamicsbook: Changes Made in Navision Attain 3.60 Blog bot Dynamics CRM: Blogs 0 02.09.2008 13:23
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 20:33.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.