# Adding \`is\_controller\` to the System API

**URL:** <https://forum.dfinity.org/t/adding-is-controller-to-the-system-api/18765>\
**Category:** Developers\
**Created:** [March 1, 2023, 11:04am UTC](https://forum.dfinity.org/t/adding-is-controller-to-the-system-api/18765 "2023-03-01T11:04:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bogwar](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/bogwar/32/2161_2.png) [@bogwar](https://forum.dfinity.org/u/bogwar)\
**Post date:** [March 1, 2023, 11:04am UTC](https://forum.dfinity.org/t/adding-is-controller-to-the-system-api/18765/1 "2023-03-01T11:04:49Z")

</div>

We have been discussing adding a method `is_controller` to the system API which would allow a canister to determine if a given principal is a controller of the canister.

During the discussions, we considered a more general API that would allow the canister to fetch the entire list of controllers. However, our internal consensus was that that API is more complex to implement and use and the canister can already get that information, asynchronously, from via the management canister. Furthermore, when this issue came up [before](https://forum.dfinity.org/t/get-controllers-without-async/16719), `is_controller` was sufficient and no other compelling use cases came up in our discussions.  
We’d appreciate any inputs into this discussion from the community.

---

<div class="post-metadata">

**Author:** ![skilesare](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/skilesare/32/5609_2.png) [@skilesare](https://forum.dfinity.org/u/skilesare)\
**Post date:** [March 1, 2023, 11:09am UTC](https://forum.dfinity.org/t/adding-is-controller-to-the-system-api/18765/2 "2023-03-01T11:09:14Z")

</div>

It could be useful when creating new canisters and wanting to copy the parent controllers to the children. Less awaits are nice.

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [March 1, 2023, 11:41am UTC](https://forum.dfinity.org/t/adding-is-controller-to-the-system-api/18765/3 "2023-03-01T11:41:28Z")

</div>

Since you linked my post, sure for me `is_controller` would be suffisant from my point of view. e.g. I can imagine that I could use it in guards. Will the information be available synchronously? i.e. will I be able to use it in `query` too?

---

<div class="post-metadata">

**Author:** ![bogwar](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/bogwar/32/2161_2.png) [@bogwar](https://forum.dfinity.org/u/bogwar)\
**Post date:** [March 1, 2023, 11:46am UTC](https://forum.dfinity.org/t/adding-is-controller-to-the-system-api/18765/4 "2023-03-01T11:46:51Z")

</div>

Adding the method to the system API ensures that the method is available synchronously; it should also be callable in a non-replicated execution context so you can do access control in query calls.

---

<div class="post-metadata">

**Author:** ![bogwar](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/bogwar/32/2161_2.png) [@bogwar](https://forum.dfinity.org/u/bogwar)\
**Post date:** [March 1, 2023, 11:56am UTC](https://forum.dfinity.org/t/adding-is-controller-to-the-system-api/18765/5 "2023-03-01T11:56:45Z")

</div>

Creating canisters happens rather seldomly and passing the controller list even more seldomly. So, although less awaits are nice is it worth the complexity?

---

<div class="post-metadata">

**Author:** ![skilesare](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/skilesare/32/5609_2.png) [@skilesare](https://forum.dfinity.org/u/skilesare)\
**Post date:** [March 1, 2023, 3:06pm UTC](https://forum.dfinity.org/t/adding-is-controller-to-the-system-api/18765/6 "2023-03-01T15:06:11Z")

</div>

Well…I don’t know the complexity…but I see a world where canisters are created and destroyed regularly, and it would be nice if a created canister inherited the controllers of its creator, but this likely much easier to implement at the replica level.

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [March 2, 2023, 10:38am UTC](https://forum.dfinity.org/t/adding-is-controller-to-the-system-api/18765/7 "2023-03-02T10:38:35Z")

</div>

I would like to see something like `self_canister_status` so that anything that is added to the canister status is synchronously available by default
