Hello again,

I solved my previous question when I found that Jenkins would sensibly handle a 
CredentialsUnavailableException thrown from the getSecret() implementation. 
This is just a suitably named unchecked exception that’s provided by the 
credentials plugin.

Chris

On Tue, 23 Apr 2019, at 5:37 PM, Chris Kilding wrote:
> Hi Stephen,
> 
> I did have one question that’s not covered by the guide...
> 
> The guide says that a credential that fetches its secret value from a remote 
> service must throw an IOException if there is a data-related problem (eg 404 
> not found), and an InterruptedException if the lookup times out.
> 
> However the guide also says that if there is already a de-facto standard 
> credential type, one’s own credential Provider should use that.
> 
> In my case I need to extend BaseStandardCredentials / implement 
> StringCredentials, and look up the AWS Secret Value within getSecret(). 
> However the StringCredentials interface does not allow IOException or 
> InterruptedException to be thrown by implementations.
> 
> The guide even acknowledges that this was a design flaw in the standard 
> credentials types... but unfortunately it doesn’t say what to do instead, to 
> work around this.
> 
> So, should an implementation of StringCredentials#getSecret()...
> 
> - Throw an unchecked exception?
> - Return null?
> - Something else?
> 
> Chris
> 
> On Tue, 9 Apr 2019, at 1:41 PM, Stephen Connolly wrote:
>> 
>> 
>> On Tue, 9 Apr 2019 at 11:57, Chris Kilding <[email protected] 
>> <mailto:chris%[email protected]>> wrote:
>>> __
>>> Hi Stephen,
>>> 
>>> When I started building the plugin my basis was a combination of your guide 
>>> and the Kubernetes Credentials Provider.
>>> 
>>> The following sections of your guide were particularly valuable right from 
>>> the start of development:
>>> 
>>> - The caching strategy guide for remote credentials providers (cache 
>>> metadata for N minutes, retrieve secret data live).
>>> - “Implementing a new Credentials type” (when and how to extend the 
>>> standard types properly, when to make a new type).
>>> 
>>> I’m finding the guide is becoming more understandable (and I can get more 
>>> out of it) now I’ve learned the basic architecture of Jenkins plugins. In 
>>> the beginning it’s easier to work off an existing plugin’s code, but now I 
>>> can read more of your guide and see implementation mistakes that need to be 
>>> corrected.
>>> 
>>> Much like any other technical manual, its utility for the reader increases 
>>> with the reader’s knowledge of the subject. Many thanks for writing it :)
>> 
>> Glad to hear. I wasn't happy moving my focus away from Jenkins plugins 
>> without leaving guides to the community for the stuff I believe to be 
>> important (credentials and scm-api). I am glad you have found (and are still 
>> finding) utility in the content. Feel free to create PRs with any suggested 
>> improvements as I am paying attention... just not as frequently ;-)
>> 
>> - Stephen
>> 
>>> 
>>> 
>>> Chris
>>> 
>>> On Mon, 8 Apr 2019, at 8:00 PM, Stephen Connolly wrote:
>>>> It would be great to get any feedback on the docs I left for writing such 
>>>> things: 
>>>> https://github.com/jenkinsci/credentials-plugin/blob/master/docs/implementation.adoc#implementing-a-new-credentialsprovider
>>>> 
>>>> On Thu 4 Apr 2019 at 17:10, Chris Kilding <[email protected] 
>>>> <mailto:chris%[email protected]>> wrote:
>>>>> __
>>>>> Hi,
>>>>> 
>>>>> That sounds good - we’re happy to host in jenkinsci and make the plugin 
>>>>> available through the built-in Jenkins plugin manager.
>>>>> 
>>>>> As Jesse suggested we did indeed base our plugin on the Kubernetes 
>>>>> credentials provider.
>>>>> 
>>>>> Would we be able to do it all in a single Github repo inside the 
>>>>> jenkinsci org? Or would we have to run a separate upstream repo in our 
>>>>> own Github account, with a fork under jenkinsci? (We’d prefer to go with 
>>>>> the first option and cut out the middleman, if that makes sense.)
>>>>> 
>>>>> On Thu, 4 Apr 2019, at 4:51 PM, Daniel Beck wrote:
>>>>>> Can't wait to check this out. Thanks for publishing it!
>>>>>> 
>>>>>> > On 4. Apr 2019, at 16:21, Chris Kilding 
>>>>>> > <[email protected] 
>>>>>> > <mailto:chris%[email protected]>> wrote:
>>>>>> > 
>>>>>> > We’re initially thinking it should be a Github repo under the 
>>>>>> > ‘jenkinsci’ or ‘aws’ organisations, with our own engineers added to 
>>>>>> > that repo as external collaborators. (These would seem to be the most 
>>>>>> > natural homes for the plugin.) But we’re open to other suggestions :)
>>>>>> 
>>>>>> We require that plugins distributed by the Jenkins project be hosted in 
>>>>>> the jenkinsci organization (with some exceptions grandfathered in). So 
>>>>>> if you want to make it as easy as possible to install with the built-in 
>>>>>> plugin manager, I would recommend you host in jenkinsci.
>>>>>> 
>>>>>> Docs for this (these largely superseded the wiki): 
>>>>>> https://jenkins.io/doc/developer/publishing/requesting-hosting/
>>>>>> 
>>>>>> -- 
>>>>>> You received this message because you are subscribed to the Google 
>>>>>> Groups "Jenkins Developers" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>>> an email to [email protected] 
>>>>>> <mailto:jenkinsci-dev%[email protected]>.
>>>>>> To view this discussion on the web visit 
>>>>>> https://groups.google.com/d/msgid/jenkinsci-dev/4EDC20FF-07B6-4041-86F1-2FB8F547EE61%40beckweb.net.
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>> 
>>>>> 
>>>>> 
>>>>> 

>>>>> --
>>>>> You received this message because you are subscribed to the Google Groups 
>>>>> "Jenkins Developers" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>>>> email to [email protected].
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/jenkinsci-dev/e5245e90-3492-4276-b3a4-fd220f71f45c%40www.fastmail.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/jenkinsci-dev/e5245e90-3492-4276-b3a4-fd220f71f45c%40www.fastmail.com?utm_medium=email&utm_source=footer>.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>> -- 
>>>> Sent from my phone
>>>> 

>>>> --
>>>> You received this message because you are subscribed to the Google Groups 
>>>> "Jenkins Developers" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>>> email to [email protected].
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/jenkinsci-dev/CA%2BnPnMyBm9uqmYtsGePbNKi5n1AFmtWt03kffLonXnogyZd%3DUw%40mail.gmail.com
>>>>  
>>>> <https://groups.google.com/d/msgid/jenkinsci-dev/CA%2BnPnMyBm9uqmYtsGePbNKi5n1AFmtWt03kffLonXnogyZd%3DUw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>>>> For more options, visit https://groups.google.com/d/optout.
>>> 
>>> 

>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "Jenkins Developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to [email protected].
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-dev/754ab0ff-32b6-4daf-8b2d-b4018dc64aed%40www.fastmail.com
>>>  
>>> <https://groups.google.com/d/msgid/jenkinsci-dev/754ab0ff-32b6-4daf-8b2d-b4018dc64aed%40www.fastmail.com?utm_medium=email&utm_source=footer>.
>>> For more options, visit https://groups.google.com/d/optout.
>> 

>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-dev/CA%2BnPnMz_%2BeBNGLaUznW5-kHOmjHXojNzdLrWWG0cs6yKsnnjpw%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-dev/CA%2BnPnMz_%2BeBNGLaUznW5-kHOmjHXojNzdLrWWG0cs6yKsnnjpw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>> For more options, visit https://groups.google.com/d/optout.
> 
> 

> --
>  You received this message because you are subscribed to the Google Groups 
> "Jenkins Developers" group.
>  To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
>  To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-dev/7a587688-2890-44fe-a5bb-513849f70706%40www.fastmail.com
>  
> <https://groups.google.com/d/msgid/jenkinsci-dev/7a587688-2890-44fe-a5bb-513849f70706%40www.fastmail.com?utm_medium=email&utm_source=footer>.
>  For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/dc2d3bad-e8ba-47aa-834b-157b69c71634%40www.fastmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to