Class BitwardenCredentialsStore

java.lang.Object
com.cloudbees.plugins.credentials.CredentialsStore
com.mwdle.bitwarden.BitwardenCredentialsStore
All Implemented Interfaces:
Saveable, AccessControlled

public class BitwardenCredentialsStore extends com.cloudbees.plugins.credentials.CredentialsStore
A simple, stateless view of the BitwardenCredentialsProvider for the Jenkins UI.

This class's only responsibility is to provide a list of Bitwarden credentials to be displayed in the Jenkins "Credentials" page. It acts as a read-only view and delegates all credential-listing logic to the provider.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    The UI action that makes this store visible in the Jenkins sidebar and credentials list.
  • Field Summary

    Fields inherited from interface hudson.model.Saveable

    NOOP
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs the store.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    addCredentials(com.cloudbees.plugins.credentials.domains.Domain domain, com.cloudbees.plugins.credentials.Credentials credentials)
    Unsupported operation.
    List<com.cloudbees.plugins.credentials.Credentials>
    getCredentials(com.cloudbees.plugins.credentials.domains.Domain domain)
    com.cloudbees.plugins.credentials.CredentialsStoreAction
    boolean
    hasPermission2(org.springframework.security.core.Authentication a, Permission permission)
    boolean
    removeCredentials(com.cloudbees.plugins.credentials.domains.Domain domain, com.cloudbees.plugins.credentials.Credentials credentials)
    Unsupported operation.
    boolean
    updateCredentials(com.cloudbees.plugins.credentials.domains.Domain domain, com.cloudbees.plugins.credentials.Credentials current, com.cloudbees.plugins.credentials.Credentials replacement)
    Unsupported operation.

    Methods inherited from class com.cloudbees.plugins.credentials.CredentialsStore

    _isApplicable, addDomain, addDomain, checkPermission, getACL, getContextDisplayName, getCredentialsDescriptors, getDomainByName, getDomains, getProvider, getProviderOrDie, getRelativeLinkTo, getRelativeLinkToAction, getRelativeLinkToContext, getScopes, hasPermission, hasPermission, isApplicable, isDomainsModifiable, removeDomain, save, updateDomain

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface hudson.security.AccessControlled

    checkAnyPermission, hasAnyPermission
  • Constructor Details

    • BitwardenCredentialsStore

      public BitwardenCredentialsStore(BitwardenCredentialsProvider provider)
      Constructs the store.
      Parameters:
      provider - The provider that this store will represent in the UI.
  • Method Details

    • getContext

      @Nonnull public ItemGroup<?> getContext()
      Specified by:
      getContext in class com.cloudbees.plugins.credentials.CredentialsStore
    • hasPermission2

      public boolean hasPermission2(@Nonnull org.springframework.security.core.Authentication a, @Nonnull Permission permission)

      Delegates permission checks to the Jenkins root ACL.

      Specified by:
      hasPermission2 in interface AccessControlled
      Overrides:
      hasPermission2 in class com.cloudbees.plugins.credentials.CredentialsStore
    • getStoreAction

      public com.cloudbees.plugins.credentials.CredentialsStoreAction getStoreAction()
      Overrides:
      getStoreAction in class com.cloudbees.plugins.credentials.CredentialsStore
    • getDisplayName

      public String getDisplayName()
      Overrides:
      getDisplayName in class com.cloudbees.plugins.credentials.CredentialsStore
    • addCredentials

      public boolean addCredentials(@Nonnull com.cloudbees.plugins.credentials.domains.Domain domain, @Nonnull com.cloudbees.plugins.credentials.Credentials credentials)
      Unsupported operation. Credentials must be managed in Bitwarden.
      Specified by:
      addCredentials in class com.cloudbees.plugins.credentials.CredentialsStore
      Returns:
      always false.
    • removeCredentials

      public boolean removeCredentials(@Nonnull com.cloudbees.plugins.credentials.domains.Domain domain, @Nonnull com.cloudbees.plugins.credentials.Credentials credentials)
      Unsupported operation. Credentials must be managed in Bitwarden.
      Specified by:
      removeCredentials in class com.cloudbees.plugins.credentials.CredentialsStore
      Returns:
      always false.
    • updateCredentials

      public boolean updateCredentials(@Nonnull com.cloudbees.plugins.credentials.domains.Domain domain, @Nonnull com.cloudbees.plugins.credentials.Credentials current, @Nonnull com.cloudbees.plugins.credentials.Credentials replacement)
      Unsupported operation. Credentials must be managed in Bitwarden.
      Specified by:
      updateCredentials in class com.cloudbees.plugins.credentials.CredentialsStore
      Returns:
      always false.
    • getCredentials

      @Nonnull public List<com.cloudbees.plugins.credentials.Credentials> getCredentials(@Nonnull com.cloudbees.plugins.credentials.domains.Domain domain)

      Returns the list of credentials to be displayed in the UI. This method delegates to the provider's safe listCredentials method.

      Specified by:
      getCredentials in class com.cloudbees.plugins.credentials.CredentialsStore