Skip to content

Commit 36c1cee

Browse files
committed
Deleting unused credentials query language
1 parent 21d5e76 commit 36c1cee

File tree

18 files changed

+8
-1189
lines changed

18 files changed

+8
-1189
lines changed

docs/consumer.adoc

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -281,26 +281,6 @@ We leverage the https://plugins.jenkins.io/authentication-tokens[Authentication
281281
This means that we can use the `AuthenticationTokens.matcher(Class)` to restrict the list of credentials to the subset that can be converted.
282282
Alternatively, more complex conversion contexts can be handled with `AuthenticationTokens.matcher(AuthenticationTokenContext)`
283283

284-
* We want to let the user select the credentials to toggle the deployment state of a blue/green deployment for a completed build.
285-
+
286-
[source,java]
287-
----
288-
CredentialsProvider.listCredentialsInItem(
289-
StandardCredentials.class, // <1>
290-
job,
291-
Jenkins.getAuthentication2(), // <2>
292-
URIRequirementBuilder.fromUri(loadBalancerUrl),
293-
CredentialsMatchers.allOf(
294-
AuthenticationTokens.matcher(LoadBalancerAuthentication.class),
295-
CredentialsMatchers.withProperty("permission", "lb.switch") // <3>
296-
)
297-
)
298-
----
299-
<1> There are different credential types that can be used to authenticate with the load balancer, this is the common base class.
300-
<2> This is an immediate action performed by the user.
301-
<3> In this case there may be multiple credentials available to the user, we only want the ones with `"lb.switch".equals(credential.getPermission())`.
302-
Any credentials that do not have a `getPermission()` method will be excluded as well as any that do not have the corresponding return value.
303-
304284
* We want to let the user specify the credentials used to update the post commit receive hooks of a source control system for any corresponding jobs configured in Jenkins.
305285
+
306286
[NOTE]

docs/implementation.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,6 @@ The `CredentialsProvider` extension point is perhaps one of the more complicated
576576
* Where the backing store is remote from Jenkins then:
577577

578578
** potentially has to be able to either instantiate `java.lang.reflect.Proxy` implementations for credentials, or create on-demand implementation classes using http://asm.ow2.org/[ASM] (or similar).
579-
** potentially has to deal with parsing the `CredentialsMatcher` query language in order to minimize transfer of information over the network.
580579
** may need to store Jenkins specific state in Jenkins in order to provide credentials domain support.
581580

582581
* Where the backing store is local to Jenkins but contextual to a specific Jenkins model object and not covered by the three existing credentials providers: System, User and Folder, then replication of that code will likely be required.
@@ -597,7 +596,6 @@ These existing examples are probably not good as reference examples as they have
597596
+
598597
A good reference implementation would be clean of such distractions.
599598
* [ ] Provide links to some other implementations of credentials providers for other use cases.
600-
* [ ] Provide some details on how the Credentials Query Language can be used to limit querying credentials from the remote service
601599
602600
====
603601

pom.xml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -186,23 +186,6 @@
186186
<compatibleSinceVersion>1354</compatibleSinceVersion>
187187
</configuration>
188188
</plugin>
189-
<plugin>
190-
<groupId>org.antlr</groupId>
191-
<artifactId>antlr4-maven-plugin</artifactId>
192-
<!-- This must be compatible with the ANTLR runtime provided by Jenkins core. -->
193-
<version>4.13.2</version>
194-
<configuration>
195-
<listener>true</listener>
196-
<visitor>true</visitor>
197-
</configuration>
198-
<executions>
199-
<execution>
200-
<goals>
201-
<goal>antlr4</goal>
202-
</goals>
203-
</execution>
204-
</executions>
205-
</plugin>
206189
</plugins>
207190
</build>
208191
</project>

0 commit comments

Comments
 (0)