Matrix Auth & Loading Permissions

59 views
Skip to first unread message

Bryan Stopp

unread,
Sep 13, 2024, 5:34:26 PM9/13/24
to Jenkins Developers
Hello!

Can anyone guide me on how to get a plugin to be registered in the system correctly such that permissions show up in the Matrix group/item view, on boot.

If i navigate to the `Manage` view, then go to the Security section, my permission group and individual permissions show up. However, if i navigate directly to the Security view they do not.

I assume it has something to do with Jenkins not finding my class or its describable/descriptor on boot. But I'm not able to figure out what i'm doing wrong.

I've been using the Credentials Plugin as an example, as that seems to always be loaded - which is my goal.

Any help would be appreciated, TIA.

-Bryan

Daniel Beck

unread,
Sep 13, 2024, 6:15:30 PM9/13/24
to jenkin...@googlegroups.com
On Fri, Sep 13, 2024 at 11:34 PM Bryan Stopp <bryan...@gmail.com> wrote:
Can anyone guide me on how to get a plugin to be registered in the system correctly such that permissions show up in the Matrix group/item view, on boot.

If i navigate to the `Manage` view, then go to the Security section, my permission group and individual permissions show up. However, if i navigate directly to the Security view they do not.

I assume it has something to do with Jenkins not finding my class or its describable/descriptor on boot. But I'm not able to figure out what i'm doing wrong.

Workarounds to JENKINS-17200 involve writing code that gets loaded early through some mechanism. Extensions aren't bad, but they are only really loaded on demand I think, depending on how you register them, and probably what you're experiencing. You could try an @Initializer annotated method to make Jenkins load your class earlier than it would otherwise.

Bryan Stopp

unread,
Sep 13, 2024, 6:38:58 PM9/13/24
to Jenkins Developers
> Workarounds to JENKINS-17200 involve writing code that gets loaded early through some mechanism.

So, I assume the credentials plugin is doing this, any direction which mechanism they're using?

- Bryan

Daniel Beck

unread,
Sep 13, 2024, 7:32:08 PM9/13/24
to jenkin...@googlegroups.com
On Sat, Sep 14, 2024 at 12:39 AM Bryan Stopp <bryan...@gmail.com> wrote:

So, I assume the credentials plugin is doing this, any direction which mechanism they're using?

Bryan Stopp

unread,
Sep 14, 2024, 10:41:50 AM9/14/24
to jenkin...@googlegroups.com
Ahh, Thank you!

-Bryan

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-dev/kLeNdqfRZyY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAMo7Pt%2B3nU48i-jzKP3xzqau%3DYZEEUKV1U0X6yBq4oiCg%2Bfifw%40mail.gmail.com.

Jesse Glick

unread,
Sep 16, 2024, 9:21:11 AM9/16/24
to jenkin...@googlegroups.com
On Fri, Sep 13, 2024 at 6:15 PM 'Daniel Beck' via Jenkins Developers <jenkin...@googlegroups.com> wrote:
Extensions aren't bad, but they are only really loaded on demand I think, depending on how you register them

 Unfortunately all extensions are loaded eagerly during startup. It would be nice to change this, one day; it is clearest to use an `@Initializer` (pending some form of declarative registration of permissions).

Daniel Beck

unread,
Sep 16, 2024, 4:01:50 PM9/16/24
to Jenkins Developers


> On 16. Sep 2024, at 15:20, 'Jesse Glick' via Jenkins Developers <jenkin...@googlegroups.com> wrote:
>
> Unfortunately all extensions are loaded eagerly during startup.

You're right, they're loaded, just not instantiated.

Basil Crow

unread,
Sep 18, 2024, 8:38:47 PM9/18/24
to jenkin...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages